From e12131caccadbef449fc2d8b73fc7a12bb443b00 Mon Sep 17 00:00:00 2001 From: SrIzan10 <66965250+SrIzan10@users.noreply.github.com> Date: Mon, 1 May 2023 10:01:04 +0200 Subject: [PATCH] fix: oops --- index.ts | 2 +- routes/transcriptor/getTranscript.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/index.ts b/index.ts index f5c60d7..16d105b 100644 --- a/index.ts +++ b/index.ts @@ -59,7 +59,7 @@ app.post("/transcriptor/save", (req, res) => { }) app.use("/transcriptor/get", limiter) -app.post("/transcriptor/get", (req, res) => { +app.get("/transcriptor/get", (req, res) => { getTranscript(req, res) }) diff --git a/routes/transcriptor/getTranscript.ts b/routes/transcriptor/getTranscript.ts index 88d5c0f..9287988 100644 --- a/routes/transcriptor/getTranscript.ts +++ b/routes/transcriptor/getTranscript.ts @@ -2,7 +2,6 @@ import { Request, Response } from "express" import db from "../../schemas/transcripts.js" export default async function getTranscript(req: Request, res: Response) { - if (!req.body.token || req.body.token !== process.env.TRANSCRIPTS) return res.status(400).send({ success: false, reason: "no key?" }) try { var database = await db.findOne({ msgid: req.query.msgid }) } catch {