mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2025-06-20 00:25:17 +00:00
Update last user activity
This commit is contained in:
@ -225,6 +225,23 @@ export class AccountHelper {
|
||||
return result == null ? -1 : result.ID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the last activity time of the user
|
||||
*
|
||||
* @param userID Target user ID
|
||||
*/
|
||||
public static async UpdateLastActivity(userID: number) {
|
||||
await DatabaseHelper.UpdateRows({
|
||||
table: USER_TABLE,
|
||||
where: {
|
||||
ID: userID
|
||||
},
|
||||
set: {
|
||||
last_activity: time()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check out whether a virtual directory is available or not
|
||||
|
Reference in New Issue
Block a user