This commit is contained in:
nandar
2018-08-13 09:40:16 +06:30
parent f937789d1d
commit d1dfb1d262
4 changed files with 27 additions and 1 deletions

View File

@@ -86,6 +86,8 @@ GEM
ffi (1.9.25) ffi (1.9.25)
globalid (0.4.1) globalid (0.4.1)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
httparty (0.16.2)
multi_xml (>= 0.5.2)
i18n (1.0.1) i18n (1.0.1)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
jbuilder (2.7.0) jbuilder (2.7.0)
@@ -122,6 +124,7 @@ GEM
mini_portile2 (2.3.0) mini_portile2 (2.3.0)
minitest (5.11.3) minitest (5.11.3)
multi_json (1.13.1) multi_json (1.13.1)
multi_xml (0.6.0)
net-scp (1.2.1) net-scp (1.2.1)
net-ssh (>= 2.6.5) net-ssh (>= 2.6.5)
net-ssh (5.0.2) net-ssh (5.0.2)
@@ -239,6 +242,7 @@ DEPENDENCIES
devise devise
devise_uid devise_uid
execjs execjs
httparty
jbuilder (~> 2.5) jbuilder (~> 2.5)
jquery-rails jquery-rails
kaminari kaminari

View File

@@ -99,5 +99,21 @@ class Api::BatchesController < ApplicationController
end end
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 end

Binary file not shown.

View File

@@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # 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 # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
@@ -122,6 +122,12 @@ ActiveRecord::Schema.define(version: 20180726080303) do
t.string "name" t.string "name"
end 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| create_table "users", force: :cascade do |t|
t.string "name", null: false t.string "name", null: false
t.string "nrc" t.string "nrc"