Fix pornhub/mailru route merge
This commit is contained in:
@@ -7495,21 +7495,12 @@ app.post("/api/pornhub/download", requireAuth, async (req, res) => {
|
||||
return res
|
||||
.status(400)
|
||||
.json({ ok: false, error: "Geçerli bir Pornhub URL'si gerekli." });
|
||||
app.post("/api/mailru/download", requireAuth, async (req, res) => {
|
||||
try {
|
||||
const rawUrl = req.body?.url;
|
||||
const job = await startMailRuDownload(rawUrl);
|
||||
if (!job) {
|
||||
return res
|
||||
.status(400)
|
||||
.json({ ok: false, error: "Geçerli bir Mail.ru URL'si gerekli." });
|
||||
}
|
||||
res.json({ ok: true, jobId: job.id });
|
||||
} catch (err) {
|
||||
res.status(500).json({
|
||||
ok: false,
|
||||
error: err?.message || "Pornhub indirimi başarısız oldu."
|
||||
error: err?.message || "Pornhub indirimi başarısız oldu."
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user