change cloumn auth_token to app_token in employees
This commit is contained in:
@@ -40,8 +40,8 @@ class Settings::EmployeesController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def change_auth_token
|
||||
@employee.auth_token = @employee.generate_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
|
||||
|
||||
Reference in New Issue
Block a user