diff --git a/Gemfile.lock b/Gemfile.lock index f41b582..84af69c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -86,6 +86,8 @@ GEM ffi (1.9.25) globalid (0.4.1) activesupport (>= 4.2.0) + httparty (0.16.2) + multi_xml (>= 0.5.2) i18n (1.0.1) concurrent-ruby (~> 1.0) jbuilder (2.7.0) @@ -122,6 +124,7 @@ GEM mini_portile2 (2.3.0) minitest (5.11.3) multi_json (1.13.1) + multi_xml (0.6.0) net-scp (1.2.1) net-ssh (>= 2.6.5) net-ssh (5.0.2) @@ -239,6 +242,7 @@ DEPENDENCIES devise devise_uid execjs + httparty jbuilder (~> 2.5) jquery-rails kaminari diff --git a/app/controllers/api/batches_controller.rb b/app/controllers/api/batches_controller.rb index 4270d3b..2944023 100644 --- a/app/controllers/api/batches_controller.rb +++ b/app/controllers/api/batches_controller.rb @@ -99,5 +99,21 @@ class Api::BatchesController < ApplicationController end end + def get_ticket_settings + session_token=params[:session_token] + check_member= Member.authenticate_session_token(session_token) + if !check_member.nil? + settings =Setting.where("key=?",'ticket_definition_code') + arr_setting=Array.new + settings.each do |set| + str={:id => set.id,:value => set.value,:name => set.name} + arr_setting.push(str) + end + @out=true,arr_setting + else + @out=false,"Sorry!Unauthorized user!" + end + end + end \ No newline at end of file diff --git a/app/views/api/.DS_Store b/app/views/api/.DS_Store index b9277d7..a2a4c2c 100644 Binary files a/app/views/api/.DS_Store and b/app/views/api/.DS_Store differ diff --git a/db/schema.rb b/db/schema.rb index 45f9d62..713c9e0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180726080303) do +ActiveRecord::Schema.define(version: 20180810041316) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -122,6 +122,12 @@ ActiveRecord::Schema.define(version: 20180726080303) do t.string "name" end + create_table "settings", force: :cascade do |t| + t.string "key" + t.string "value" + t.string "name" + end + create_table "users", force: :cascade do |t| t.string "name", null: false t.string "nrc"