simplify session store api

This commit is contained in:
Bruno Windels 2019-02-06 23:19:29 +00:00
parent 7a15f12525
commit 3e763ab5c0

View file

@ -1,13 +1,33 @@
/**
store contains:
loginData {
device_id
home_server
access_token
user_id
}
// flags {
// lazyLoading?
// }
syncToken
displayName
avatarUrl
lastSynced
*/
class SessionStore { class SessionStore {
constructor(session, db) { constructor(sessionStore) {
this._db = new Database(db); this._sessionStore = sessionStore;
} }
get session() { readSession() {
return this._session; return this._session;
} }
writeSession(session) {
}
// or dedicated set sync_token method? // or dedicated set sync_token method?
async setAvatar(avatar) { async setAvatar(avatar) {