fix backend linting errors

This commit is contained in:
sugar 2025-01-16 20:34:25 +01:00
parent f531171c59
commit 56dcf2c956
3 changed files with 6 additions and 8 deletions

View file

@ -244,14 +244,14 @@ export class SignupApiService {
} else {
try {
const { account, secret } = await this.signupService.signup({
username, password, host, reason
username, password, host, reason,
});
if (instance.approvalRequiredForSignup) {
if (emailAddress) {
this.emailService.sendEmail(emailAddress, 'Approval pending',
'Congratulations! Your account is now pending approval. You will get notified when you have been accepted.',
'Congratulations! Your account is now pending approval. You will get notified when you have been accepted.');
'Congratulations! Your account is now pending approval. You will get notified when you have been accepted.',
'Congratulations! Your account is now pending approval. You will get notified when you have been accepted.');
}
}

View file

@ -63,12 +63,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
await this.usedUsernamesRepository.delete({ username: user.username });
//Actually delete it since the last function doesnt actually delete the account
//Note: Before approval these accounts wont federate so this is totally fine.
await this.usersRepository.delete(user.id);
this.moderationLogService.log(me, 'decline', {
userId: user.id,
userUsername: user.username,

View file

@ -37,9 +37,9 @@ export const meta = {
unapprovedUser: {
message: 'The user has not been approved yet.',
code: 'UNAPPROVED_USER',
id: '8d66f136-b3e1-48fd-92c4-30ecfd7fdb7a',
},
code: 'UNAPPROVED_USER',
id: '8d66f136-b3e1-48fd-92c4-30ecfd7fdb7a',
},
followeeIsYourself: {
message: 'Followee is yourself.',