remove final js

This commit is contained in:
Alex Holliday committed 2026-01-22 21:49:49 +00:00
1 parent ce322a8e28
commit b511cde849
12 files changed
+53 -250

No files matched your search

+7 -5
View File
@@ -1,5 +1,6 @@
import type { Invite } from "@/types/index.js";
import type { IInvitesRepository } from "@/repositories/index.js";
import { AppError } from "@/utils/AppError.js";
const SERVICE_NAME = "inviteService";
@@ -8,24 +9,20 @@ class InviteService {
private settingsService: any;
private emailService: any;
private errorService: any;
private invitesRepository: IInvitesRepository;
constructor({
invitesRepository,
settingsService,
emailService,
errorService,
}: {
invitesRepository: IInvitesRepository;
settingsService: any;
emailService: any;
errorService: any;
}) {
this.invitesRepository = invitesRepository;
this.settingsService = settingsService;
this.emailService = emailService;
this.errorService = errorService;
}
get serviceName() {
@@ -48,7 +45,12 @@ class InviteService {
});
const result = await this.emailService.sendEmail(invite.email, "Welcome to Uptime Monitor", html);
if (!result) {
throw this.errorService.createServerError("Failed to send invite e-mail... Please verify your settings.");
throw new AppError({
message: "Failed to send invite e-mail... Please verify your settings.",
service: SERVICE_NAME,
method: "sendInviteEmail",
status: 500,
});
}
};