update before pull

This commit is contained in:
Aung Myo
2018-09-07 09:41:29 +06:30
parent 209dbd2997
commit 82092686c5
2 changed files with 2 additions and 3 deletions

View File

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