feat(server): import users (#10762)

close CLOUD-167
This commit is contained in:
forehalo
2025-03-12 02:52:19 +00:00
parent ea72599bde
commit 50da76d4af
3 changed files with 69 additions and 1 deletions

View File

@@ -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) {