feat: implement notes/nb syncing (untested)

This commit is contained in:
thecodrr
2020-02-12 00:52:17 +05:00
parent e4aaf97c5d
commit 4cc24e687c
2 changed files with 29 additions and 7 deletions

View File

@@ -15,6 +15,12 @@ export default class User {
return this.context.read("user");
}
async set(user) {
if (!user) return;
user = { ...(await this.get()), ...user };
await this.context.write("user", user);
}
async login(username, password) {
let response = await authRequest("oauth/token", {
username,