fix typos

This commit is contained in:
Alex Holliday
2025-01-20 11:02:55 -08:00
parent 9f43336a03
commit 792b51b488
5 changed files with 8 additions and 9 deletions

View File

@@ -105,7 +105,6 @@ class MonitorController {
try {
const monitorStats = await this.db.getMonitorStatsById(req);
return res.success({
success: true,
msg: successMessages.MONITOR_STATS_BY_ID,
data: monitorStats,
});

View File

@@ -11,7 +11,7 @@ class JobQueueController {
getMetrics = async (req, res, next) => {
try {
const metrics = await this.jobQueue.getMetrics();
res.successs({
res.success({
msg: successMessages.QUEUE_GET_METRICS,
data: metrics,
});
@@ -24,7 +24,7 @@ class JobQueueController {
getJobs = async (req, res, next) => {
try {
const jobs = await this.jobQueue.getJobStats();
return res.successs({
return res.success({
msg: successMessages.QUEUE_GET_METRICS,
data: jobs,
});
@@ -37,7 +37,7 @@ class JobQueueController {
addJob = async (req, res, next) => {
try {
await this.jobQueue.addJob(Math.random().toString(36).substring(7));
return res.successs({
return res.success({
msg: successMessages.QUEUE_ADD_JOB,
});
} catch (error) {
@@ -49,7 +49,7 @@ class JobQueueController {
obliterateQueue = async (req, res, next) => {
try {
await this.jobQueue.obliterate();
return res.successs({
return res.success({
msg: successMessages.QUEUE_OBLITERATE,
});
} catch (error) {

View File

@@ -13,7 +13,7 @@ class SettingsController {
try {
const settings = { ...(await this.settingsService.getSettings()) };
delete settings.jwtSecret;
return res.successs({
return res.success({
msg: successMessages.GET_APP_SETTINGS,
data: settings,
});

View File

@@ -22,7 +22,7 @@ class StatusPageController {
try {
const statusPage = await this.db.createStatusPage(req.body);
return res.successs({
return res.success({
msg: successMessages.STATUS_PAGE_CREATE,
data: statusPage,
});
@@ -41,7 +41,7 @@ class StatusPageController {
try {
const { url } = req.params;
const statusPage = await this.db.getStatusPageByUrl(url);
return res.successs({
return res.success({
msg: successMessages.STATUS_PAGE_BY_URL,
data: statusPage,
});

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({
success: false,
msg,