トランザクションを使うようにしたり

This commit is contained in:
syuilo
2019-04-12 01:52:25 +09:00
parent 4198246351
commit 2ff3069d23
12 changed files with 117 additions and 67 deletions

View File

@@ -205,6 +205,14 @@ export class User {
comment: 'The native access token of the User. It will be null if the origin of the user is local.'
})
public token: string | null;
constructor(data: Partial<User>) {
if (data == null) return;
for (const [k, v] of Object.entries(data)) {
(this as any)[k] = v;
}
}
}
export interface ILocalUser extends User {