mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2026-01-25 06:04:05 +00:00
package (and their typing) updates
This commit is contained in:
10
index.ts
10
index.ts
@@ -84,7 +84,7 @@ app.use(express.static(import.meta.dirname + "/static"));
|
||||
// Healthcheck
|
||||
app.use("/health", (_req, res) => {
|
||||
res.status(200).send({ message: "OK" });
|
||||
return null;
|
||||
return;
|
||||
});
|
||||
app.use("/auth-health", isAuthenticated, async (req, res) => {
|
||||
try {
|
||||
@@ -92,13 +92,13 @@ app.use("/auth-health", isAuthenticated, async (req, res) => {
|
||||
if (!authHeaders)
|
||||
throw new ReferenceError("session does not have auth headers");
|
||||
const { resp } = await getCurrentUsersProfile({ authHeaders, res });
|
||||
if (!resp) return null;
|
||||
if (!resp) return;
|
||||
res.status(200).send({ message: "OK" });
|
||||
return null;
|
||||
return;
|
||||
} catch (error) {
|
||||
res.status(500).send({ message: "Internal Server Error" });
|
||||
logger.error("authHealthCheck", { error });
|
||||
return null;
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -116,7 +116,7 @@ app.use((req, res) => {
|
||||
'Guess the <a href="https://github.com/20kaushik02/spotify-manager">cat\'s</a> out of the bag!'
|
||||
);
|
||||
logger.info("404", { url: req.url });
|
||||
return null;
|
||||
return;
|
||||
});
|
||||
|
||||
const port = process.env["SPOTMGR_PORT"] || 5000;
|
||||
|
||||
Reference in New Issue
Block a user