1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-03 19:58:06 +02:00

No real changes, just renames

This commit is contained in:
binwiederhier 2023-06-09 14:32:34 -04:00
parent 4704b2a0e4
commit 2e8292a65f
10 changed files with 31 additions and 35 deletions
web/src/app

View file

@ -1,5 +1,9 @@
import sessionReplica from "./SessionReplica";
/**
* Manages the logged-in user's session and access token.
* The session replica is stored in IndexedDB so that the service worker can access it.
*/
class Session {
constructor(replica) {
this.replica = replica;
@ -8,14 +12,12 @@ class Session {
store(username, token) {
localStorage.setItem("user", username);
localStorage.setItem("token", token);
this.replica.store(username, token);
}
reset() {
localStorage.removeItem("user");
localStorage.removeItem("token");
this.replica.reset();
}