mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
@@ -177,6 +177,17 @@ export class UserModel extends BaseModel {
|
||||
return user;
|
||||
}
|
||||
|
||||
async importUsers(inputs: CreateUserInput[]) {
|
||||
return await Promise.allSettled(
|
||||
inputs.map(async input => {
|
||||
return await this.create({
|
||||
...input,
|
||||
registered: true,
|
||||
});
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@Transactional()
|
||||
async update(id: string, data: UpdateUserInput) {
|
||||
if (data.password) {
|
||||
|
||||
Reference in New Issue
Block a user