Add support for profile photos; default image
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user