edit api
This commit is contained in:
@@ -8,12 +8,14 @@ class Api::BatchesController < ApplicationController
|
||||
created_by = params[:created_by]
|
||||
order_ref = params[:order_ref]
|
||||
card_qty = params[:card_qty]
|
||||
adult_or_child=params[:adult_or_child]
|
||||
|
||||
user_id=check_member.user_id
|
||||
batch = Batch.create_batch(created_by,date,order_ref,card_qty,user_id)
|
||||
batch = Batch.create_batch(created_by,date,order_ref,card_qty,user_id,adult_or_child)
|
||||
if !batch.nil?
|
||||
@out=true,batch.id
|
||||
@out=true,batch.id
|
||||
else
|
||||
@out=false,'Error occurs in creating batch!'
|
||||
@out=false,'Error occurs in creating batch!'
|
||||
end
|
||||
else
|
||||
@out = false, "Sorry!Unauthorized user!"
|
||||
|
||||
Reference in New Issue
Block a user