Session data can be cleared without reloading the page
This commit is contained in:
@@ -113,6 +113,23 @@ export class History {
|
||||
this.saver(this, this.records);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear session data
|
||||
*
|
||||
* @param {string} uid unique name
|
||||
*
|
||||
*/
|
||||
clearSession(uid) {
|
||||
for (let i in this.records) {
|
||||
if (this.records[i].uname !== uid) {
|
||||
continue;
|
||||
}
|
||||
|
||||
this.records[i].session = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all history records
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user