fix: use new structure
This commit is contained in:
1 parent
a98a3dd7a3
commit
88df88891c
22 files changed
+193
-146
No files matched your search
@@ -12,6 +12,7 @@ const SERVICE_NAME = "statusPageController";
|
||||
class StatusPageController {
|
||||
constructor(db) {
|
||||
this.db = db;
|
||||
this.stringService = ServiceRegistry.get(StringService.SERVICE_NAME);
|
||||
}
|
||||
|
||||
createStatusPage = async (req, res, next) => {
|
||||
@@ -26,7 +27,7 @@ class StatusPageController {
|
||||
try {
|
||||
const statusPage = await this.db.createStatusPage(req.body, req.file);
|
||||
return res.success({
|
||||
msg: successMessages.STATUS_PAGE_CREATE(req.language),
|
||||
msg: this.stringService.statusPageCreate,
|
||||
data: statusPage,
|
||||
});
|
||||
} catch (error) {
|
||||
@@ -63,7 +64,7 @@ class StatusPageController {
|
||||
try {
|
||||
const statusPage = await this.db.getStatusPage();
|
||||
return res.success({
|
||||
msg: successMessages.STATUS_PAGE_BY_URL(req.language),
|
||||
msg: this.stringService.statusPageByUrl,
|
||||
data: statusPage,
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user