feat: user app get
This commit is contained in:
@@ -79,6 +79,19 @@ export class AppModel extends Model {
|
||||
});
|
||||
return _;
|
||||
}
|
||||
|
||||
async getPublic() {
|
||||
const value = this.toJSON();
|
||||
// 删除不需要的字段
|
||||
const data = value.data;
|
||||
if (data && data.permission) {
|
||||
delete data.permission.usernames;
|
||||
delete data.permission.password;
|
||||
delete data.permission['expiration-time'];
|
||||
}
|
||||
value.data = data;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
AppModel.init(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user