mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-21 22:35:11 +00:00
upd: add recommended checks
This commit is contained in:
parent
5152192e09
commit
fea7889e0c
1 changed files with 8 additions and 0 deletions
|
@ -45,6 +45,14 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
throw new Error('user not found or already deleted');
|
||||
}
|
||||
|
||||
if (user.approved) {
|
||||
throw new Error('user is already approved');
|
||||
}
|
||||
|
||||
if (user.host) {
|
||||
throw new Error('user is not local');
|
||||
}
|
||||
|
||||
const profile = await this.userProfilesRepository.findOneBy({ userId: ps.userId });
|
||||
|
||||
if (profile?.email) {
|
||||
|
|
Loading…
Reference in a new issue