Merge branch 'foodcourt' of gitlab.com:code2lab/SXRestaurant into foodcourt

This commit is contained in:
yarzar_code
2020-01-14 18:10:13 +06:30
7 changed files with 47 additions and 38 deletions

View File

@@ -40,8 +40,8 @@ class Settings::EmployeesController < ApplicationController
end
end
def change_auth_token
@employee.auth_token = SecureRandom.hex(10)
def change_app_token
@employee.app_token = @employee.generate_app_token #SecureRandom.hex(10)
@employee.save
flash[:notice] = 'Auth Token was successfully updated.'
redirect_to settings_employee_url(@employee)
@@ -78,6 +78,6 @@ class Settings::EmployeesController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def employee_params
params.require(:employee).permit(:name, :role, :is_active, :emp_id, :password,:order_queue_station_id, :image_path, :app_id, :auth_token)
params.require(:employee).permit(:name, :role, :is_active, :emp_id, :password,:order_queue_station_id, :image_path, :app_id, :app_token)
end
end