Add ability to update/create/delete identities

This commit is contained in:
Chocobozzz
2019-06-17 17:15:27 +02:00
committed by Thomas Citharel
parent 69fb1ec828
commit 0e485b2388
22 changed files with 927 additions and 157 deletions

View File

@@ -1,7 +1,7 @@
import { IPicture } from '@/types/picture.model';
export interface IActor {
id?: string;
id?: number;
url: string;
name: string;
domain: string|null;
@@ -13,6 +13,7 @@ export interface IActor {
}
export class Actor implements IActor {
id?: number;
avatar: IPicture | null = null;
banner: IPicture | null = null;
domain: string | null = null;

View File

@@ -20,6 +20,10 @@ export class Person extends Actor implements IPerson {
constructor(hash: IPerson | {} = {}) {
super(hash);
this.patch(hash);
}
patch (hash: any) {
Object.assign(this, hash);
}
}