mirror of
https://github.com/SrIzan10/api.git
synced 2026-06-06 00:46:48 +00:00
fix: oops
This commit is contained in:
2
index.ts
2
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)
|
||||
})
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user