purge string service

This commit is contained in:
Alex Holliday committed 2026-01-20 23:06:23 +00:00
1 parent cc9850c975
commit 4957209307
16 files changed
+41 -1048

No files matched your search

+4 -5
View File
@@ -1,10 +1,9 @@
const SERVICE_NAME = "statusPageModule";
class StatusPageModule {
constructor({ StatusPage, NormalizeData, stringService, AppSettings }) {
constructor({ StatusPage, NormalizeData, AppSettings }) {
this.StatusPage = StatusPage;
this.NormalizeData = NormalizeData;
this.stringService = stringService;
this.AppSettings = AppSettings;
}
@@ -27,7 +26,7 @@ class StatusPageModule {
if (error?.code === 11000) {
// Handle duplicate URL errors
error.status = 400;
error.message = this.stringService.statusPageUrlNotUnique;
error.message = "Status page URL must be unique";
}
error.service = SERVICE_NAME;
error.method = "createStatusPage";
@@ -87,7 +86,7 @@ class StatusPageModule {
try {
const preliminaryStatusPage = await this.StatusPage.findOne({ url });
if (!preliminaryStatusPage) {
const error = new Error(this.stringService.statusPageNotFound);
const error = new Error("Status page not found");
error.status = 404;
throw error;
}
@@ -249,7 +248,7 @@ class StatusPageModule {
},
]);
if (!statusPageQuery.length) {
const error = new Error(this.stringService.statusPageNotFound);
const error = new Error("Status page not found");
error.status = 404;
throw error;
}