Add support for profile photos; default image

This commit is contained in:
garrettmills
2020-05-18 22:55:08 -05:00
parent 2b2e7d2ebe
commit b8a0e957bb
18 changed files with 227 additions and 17 deletions

View File

@@ -34,9 +34,15 @@ class User extends AuthUser {
mfa_enabled: {type: Boolean, default: false},
mfa_enable_date: Date,
create_date: {type: Date, default: () => new Date},
photo_file_id: String,
}}
}
async photo() {
const File = this.models.get('upload::File')
return File.findById(this.photo_file_id)
}
has_authorized(client) {
return this.app_authorizations.some(x => x.client_id === client.id)
}