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 {
constructor(session, db) {
this._db = new Database(db);
constructor(sessionStore) {
this._sessionStore = sessionStore;
}
get session() {
readSession() {
return this._session;
}
writeSession(session) {
}
// or dedicated set sync_token method?
async setAvatar(avatar) {