Skip to content

Commit

Permalink
Prettify code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinaisslaying committed Mar 18, 2024
1 parent 6779ee0 commit 3fd331f
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 60 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
"pm2": "pm2 start dist/src/app.js --name 'DEL'",
"css-compile": "sh ./scripts/css_build.sh",
"snyk-protect": "snyk-protect",
"prepare": "pnpm run snyk-protect"
"prepare": "pnpm run snyk-protect",
"pretty": "npx prettier --write src/"
},
"repository": {
"type": "git",
Expand Down
48 changes: 24 additions & 24 deletions src/Routes/bots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ router.get(
.findOne({ _id: req.params.id });
if (!botExists)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
subtitle: res.__("common.error.bot.404"),
status: 404,
Expand Down Expand Up @@ -869,7 +869,7 @@ router.post(
.findOne({ _id: req.params.id });
if (!botExists)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
subtitlte: res.__("common.error.bot.404"),
status: 404,
Expand Down Expand Up @@ -939,7 +939,7 @@ router.post(
.findOne({ _id: req.params.id });
if (!botExists)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
subtitle: res.__("common.error.bot.404"),
status: 404,
Expand Down Expand Up @@ -1101,7 +1101,7 @@ router.get(
.findOne({ _id: req.params.id });
if (!botExists)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
subtitle: res.__("common.error.bot.404"),
status: 404,
Expand Down Expand Up @@ -1814,7 +1814,7 @@ router.get("/:id", variables, async (req: Request, res: Response) => {
.findOne({ vanityUrl: req.params.id });
if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -1965,7 +1965,7 @@ router.get(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -2079,7 +2079,7 @@ router.get(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -2193,7 +2193,7 @@ router.get(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -2256,7 +2256,7 @@ router.get(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -2325,7 +2325,7 @@ router.get(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -2402,7 +2402,7 @@ router.get(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -2465,7 +2465,7 @@ router.get(
.findOne({ _id: req.params.id });
if (!botExists)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
subtitle: res.__("common.error.bot.404"),
status: 404,
Expand Down Expand Up @@ -3168,7 +3168,7 @@ router.get(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -3304,7 +3304,7 @@ router.get(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -3380,7 +3380,7 @@ router.get(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -3432,7 +3432,7 @@ router.get(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -3478,7 +3478,7 @@ router.post(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -3601,7 +3601,7 @@ router.get(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -3642,7 +3642,7 @@ router.post(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -3766,7 +3766,7 @@ router.get(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -3807,7 +3807,7 @@ router.post(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -3933,7 +3933,7 @@ router.get(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -3974,7 +3974,7 @@ router.post(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down Expand Up @@ -4088,7 +4088,7 @@ router.get(

if (!bot)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.bot.404"),
Expand Down
18 changes: 9 additions & 9 deletions src/Routes/servers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ router.get("/:id", variables, async (req: Request, res: Response) => {
.findOne({ _id: req.params.id });
if (!server)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.server.404"),
Expand Down Expand Up @@ -479,7 +479,7 @@ router.get(

if (!server)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.server.404"),
Expand Down Expand Up @@ -829,7 +829,7 @@ router.get(

if (!server)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.server.404"),
Expand Down Expand Up @@ -884,7 +884,7 @@ router.post(

if (!server)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.server.404"),
Expand Down Expand Up @@ -1007,7 +1007,7 @@ router.get(

if (!server)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.server.404"),
Expand Down Expand Up @@ -1106,7 +1106,7 @@ router.get(

if (!server)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.server.404"),
Expand Down Expand Up @@ -1163,7 +1163,7 @@ router.get(

if (!server)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.server.404"),
Expand Down Expand Up @@ -1198,7 +1198,7 @@ router.post(

if (!server)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.server.404"),
Expand Down Expand Up @@ -1280,7 +1280,7 @@ router.get(

if (!server)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.server.404"),
Expand Down
18 changes: 9 additions & 9 deletions src/Routes/staff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ router.get(

if (!user)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.user.404"),
Expand Down Expand Up @@ -313,7 +313,7 @@ router.post(

if (!user)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.user.404"),
Expand Down Expand Up @@ -388,7 +388,7 @@ router.get(

if (!user)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.user.404"),
Expand Down Expand Up @@ -458,7 +458,7 @@ router.get(

if (!user)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.user.404"),
Expand Down Expand Up @@ -532,7 +532,7 @@ router.post(

if (!user)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.user.404"),
Expand Down Expand Up @@ -608,7 +608,7 @@ router.get(

if (!user)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.user.404"),
Expand Down Expand Up @@ -659,7 +659,7 @@ router.post(

if (!user)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.user.404"),
Expand Down Expand Up @@ -728,7 +728,7 @@ router.get(

if (!user)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.user.404"),
Expand Down Expand Up @@ -779,7 +779,7 @@ router.post(

if (!user)
return res.status(404).render("status", {
res,
res,
title: res.__("common.error"),
status: 404,
subtitle: res.__("common.error.user.404"),
Expand Down
Loading

0 comments on commit 3fd331f

Please sign in to comment.