summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-08 17:22:00 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-08 17:22:00 +0200
commitcfde9dd2d53982e2433da158847b76db78f14298 (patch)
tree5df8ec958248a3079d1d499b9b7e60b59cff32ab
parent:sparkles: get cdn endpoint from env (diff)
downloadserver-cfde9dd2d53982e2433da158847b76db78f14298.tar.xz
:sparkles: ping route
-rw-r--r--src/middlewares/Authentication.ts1
-rw-r--r--src/routes/ping.ts9
2 files changed, 10 insertions, 0 deletions
diff --git a/src/middlewares/Authentication.ts b/src/middlewares/Authentication.ts
index 76b335ad..01b7ef57 100644
--- a/src/middlewares/Authentication.ts
+++ b/src/middlewares/Authentication.ts
@@ -6,6 +6,7 @@ export const NO_AUTHORIZATION_ROUTES = [
 	/^\/api(\/v\d+)?\/auth\/login/,
 	/^\/api(\/v\d+)?\/auth\/register/,
 	/^\/api(\/v\d+)?\/webhooks\//,
+	/^\/api(\/v\d+)?\/ping/,
 	/^\/api(\/v\d+)?\/gateway/,
 	/^\/api(\/v\d+)?\/experiments/,
 	/^\/api(\/v\d+)?\/guilds\/\d+\/widget\.(json|png)/
diff --git a/src/routes/ping.ts b/src/routes/ping.ts
new file mode 100644
index 00000000..38daf81e
--- /dev/null
+++ b/src/routes/ping.ts
@@ -0,0 +1,9 @@
+import { Router, Response, Request } from "express";
+
+const router = Router();
+
+router.get("/", (req: Request, res: Response) => {
+	res.send("pong");
+});
+
+export default router;