Add missing fields to application model

This commit is contained in:
Dominik Korsa 2021-02-13 14:57:49 +01:00
parent 730f7d5b34
commit 52e9fee664
No known key found for this signature in database
GPG key ID: 9F6F7E66CBF4C1D9

View file

@ -17,12 +17,22 @@ export default class Application {
@Field(() => String)
public iconColor!: string;
@Field(() => String, {
nullable: true,
})
public homepage!: string | null;
@Field(() => Boolean)
public verified!: boolean;
public static fromEntity(entity: ApplicationEntity): Application {
return {
id: entity._id.toHexString(),
iconColor: entity.iconColor,
iconUrl: entity.iconUrl,
name: entity.name,
homepage: entity.homepage,
verified: entity.verified,
};
}
}