Add ability to update/create/delete identities
This commit is contained in:
committed by
Thomas Citharel
parent
69fb1ec828
commit
0e485b2388
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user