mirror of
https://github.com/SrIzan10/api.git
synced 2026-06-06 00:46:48 +00:00
11 lines
483 B
TypeScript
11 lines
483 B
TypeScript
import { Request, Response } from "express"
|
|
import db from "../../schemas/transcripts.js"
|
|
|
|
export default async function getTranscript(req: Request, res: Response) {
|
|
try {
|
|
var database = await db.findOne({ msgid: req.query.msgid })
|
|
} catch {
|
|
return res.status(400).send({ success: false, reason: "msgid not found in db" })
|
|
}
|
|
res.status(200).send({ text: database?.text, username: database?.username, guild: database?.guild, msgid: database?.msgid })
|
|
} |