fix: database problem
This commit is contained in:
parent
5d0012ceac
commit
a87776f41e
7 changed files with 38 additions and 75 deletions
|
@ -138,13 +138,6 @@ export class SignupService {
|
|||
|
||||
if (exist) throw new Error(' the username is already used');
|
||||
|
||||
const condition = await transactionalEntityManager.save(new MiAutoRemovalCondition({
|
||||
id: this.idService.gen(),
|
||||
deleteAfter: 7,
|
||||
noPiningNotes: false,
|
||||
noSpecifiedNotes: false,
|
||||
}));
|
||||
|
||||
account = await transactionalEntityManager.save(new MiUser({
|
||||
id: this.idService.gen(),
|
||||
username: username,
|
||||
|
@ -152,11 +145,16 @@ export class SignupService {
|
|||
host: this.utilityService.toPunyNullable(host),
|
||||
token: secret,
|
||||
autoRemoval: false,
|
||||
autoRemovalConditionId: condition.id,
|
||||
autoRemovalCondition: condition,
|
||||
isRoot: isTheFirstUser,
|
||||
}));
|
||||
|
||||
await transactionalEntityManager.save(new MiAutoRemovalCondition({
|
||||
userId: account.id,
|
||||
deleteAfter: 7,
|
||||
noPiningNotes: false,
|
||||
noSpecifiedNotes: false,
|
||||
}));
|
||||
|
||||
await transactionalEntityManager.save(new MiUserKeypair({
|
||||
publicKey: keyPair[0],
|
||||
privateKey: keyPair[1],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue