fix typos

This commit is contained in:
Alex Holliday committed 2025-01-20 11:02:55 -08:00
1 parent 9f43336a03
commit 792b51b488
5 files changed
+8 -9

No files matched your search

-1
View File
@@ -105,7 +105,6 @@ class MonitorController {
try { try {
const monitorStats = await this.db.getMonitorStatsById(req); const monitorStats = await this.db.getMonitorStatsById(req);
return res.success({ return res.success({
success: true,
msg: successMessages.MONITOR_STATS_BY_ID, msg: successMessages.MONITOR_STATS_BY_ID,
data: monitorStats, data: monitorStats,
}); });
+4 -4
View File
@@ -11,7 +11,7 @@ class JobQueueController {
getMetrics = async (req, res, next) => { getMetrics = async (req, res, next) => {
try { try {
const metrics = await this.jobQueue.getMetrics(); const metrics = await this.jobQueue.getMetrics();
res.successs({ res.success({
msg: successMessages.QUEUE_GET_METRICS, msg: successMessages.QUEUE_GET_METRICS,
data: metrics, data: metrics,
}); });
@@ -24,7 +24,7 @@ class JobQueueController {
getJobs = async (req, res, next) => { getJobs = async (req, res, next) => {
try { try {
const jobs = await this.jobQueue.getJobStats(); const jobs = await this.jobQueue.getJobStats();
return res.successs({ return res.success({
msg: successMessages.QUEUE_GET_METRICS, msg: successMessages.QUEUE_GET_METRICS,
data: jobs, data: jobs,
}); });
@@ -37,7 +37,7 @@ class JobQueueController {
addJob = async (req, res, next) => { addJob = async (req, res, next) => {
try { try {
await this.jobQueue.addJob(Math.random().toString(36).substring(7)); await this.jobQueue.addJob(Math.random().toString(36).substring(7));
return res.successs({ return res.success({
msg: successMessages.QUEUE_ADD_JOB, msg: successMessages.QUEUE_ADD_JOB,
}); });
} catch (error) { } catch (error) {
@@ -49,7 +49,7 @@ class JobQueueController {
obliterateQueue = async (req, res, next) => { obliterateQueue = async (req, res, next) => {
try { try {
await this.jobQueue.obliterate(); await this.jobQueue.obliterate();
return res.successs({ return res.success({
msg: successMessages.QUEUE_OBLITERATE, msg: successMessages.QUEUE_OBLITERATE,
}); });
} catch (error) { } catch (error) {
+1 -1
View File
@@ -13,7 +13,7 @@ class SettingsController {
try { try {
const settings = { ...(await this.settingsService.getSettings()) }; const settings = { ...(await this.settingsService.getSettings()) };
delete settings.jwtSecret; delete settings.jwtSecret;
return res.successs({ return res.success({
msg: successMessages.GET_APP_SETTINGS, msg: successMessages.GET_APP_SETTINGS,
data: settings, data: settings,
}); });
+2 -2
View File
@@ -22,7 +22,7 @@ class StatusPageController {
try { try {
const statusPage = await this.db.createStatusPage(req.body); const statusPage = await this.db.createStatusPage(req.body);
return res.successs({ return res.success({
msg: successMessages.STATUS_PAGE_CREATE, msg: successMessages.STATUS_PAGE_CREATE,
data: statusPage, data: statusPage,
}); });
@@ -41,7 +41,7 @@ class StatusPageController {
try { try {
const { url } = req.params; const { url } = req.params;
const statusPage = await this.db.getStatusPageByUrl(url); const statusPage = await this.db.getStatusPageByUrl(url);
return res.successs({ return res.success({
msg: successMessages.STATUS_PAGE_BY_URL, msg: successMessages.STATUS_PAGE_BY_URL,
data: statusPage, data: statusPage,
}); });
+1 -1
View File
@@ -7,7 +7,7 @@ const responseHandler = (req, res, next) => {
}); });
}; };
res.error = ({ status = 500, msg = "Internal server erro", data = null }) => { res.error = ({ status = 500, msg = "Internal server error", data = null }) => {
return res.status(status).json({ return res.status(status).json({
success: false, success: false,
msg, msg,