mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-22 00:10:14 +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