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

This commit is contained in:
yarzar_code
2019-12-18 17:49:30 +06:30

View File

@@ -41,7 +41,7 @@ class Employee < ApplicationRecord
if (session_token) if (session_token)
user = Employee.find_by_token_session(session_token) user = Employee.find_by_token_session(session_token)
expiry_time = login_expiry_time expiry_time = login_expiry_time
if !user.session_expiry.nil?
if user && user.session_expiry.utc > DateTime.now.utc if user && user.session_expiry.utc > DateTime.now.utc
#Extend the login time each time authenticatation take place #Extend the login time each time authenticatation take place
user.session_expiry = user.session_expiry.utc + expiry_time.minutes user.session_expiry = user.session_expiry.utc + expiry_time.minutes
@@ -51,6 +51,7 @@ class Employee < ApplicationRecord
return false return false
end end
end end
end
return false return false
end end