Apply prettier formatting

This commit is contained in:
github-actions[bot] 2023-05-31 23:17:57 +00:00 committed by TSR Berry
parent 09ee4e3ed8
commit 248861d8f1
No known key found for this signature in database
GPG key ID: 52353C0A4CCA15E2
2 changed files with 22 additions and 21 deletions

View file

@ -6,7 +6,7 @@ const router = Router();
router.get("/", async (req, res, next) => {
const result = await redisClient.json.get("ldn");
if (result == null || typeof (result) != "object") {
if (result == null || typeof result != "object") {
return res.sendStatus(404);
}
@ -22,7 +22,7 @@ router.get("/public_games", async (req, res, next) => {
const results = await redisClient.json.get("games");
if (results == null || typeof (results) != "object") {
if (results == null || typeof results != "object") {
return res.sendStatus(404);
}
@ -35,5 +35,4 @@ router.get("/public_games", async (req, res, next) => {
return res.send(games);
});
export default router;

View file

@ -1,6 +1,6 @@
import express from "express";
import actuator from "express-actuator";
import { createClient } from 'redis';
import { createClient } from "redis";
import winston from "winston";
import apiRouter from "./api";
import { errorLogger, requestLogger } from "./middleware";
@ -26,7 +26,9 @@ export const redisClient = createClient({
readonly: true,
});
redisClient.on("error", (err: Error) => winston.error("An error occurred.", { source: "Redis client", error: err }));
redisClient.on("error", (err: Error) =>
winston.error("An error occurred.", { source: "Redis client", error: err })
);
// Init express server
export const app = express();