From 84087adb82de33d3c696624df1cce1a3f42ac5d9 Mon Sep 17 00:00:00 2001 From: aeroreyna Date: Fri, 30 Dec 2022 08:27:34 -0500 Subject: [PATCH] profile embedded and media entry points --- routes/post.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/routes/post.js b/routes/post.js index 515a076..6fa9670 100644 --- a/routes/post.js +++ b/routes/post.js @@ -110,6 +110,24 @@ DB.getDB.then((DB) => { }); }); + router.get("/usr/:id/embedded", async (req, res) => { + const profileid = req.params.id; + const posts = await DB.getMediaTagPostOfUser(profileid, "@iframe:"); + return res.json({ + status: "ok", + posts + }); + }); + + router.get("/usr/:id/media", async (req, res) => { + const profileid = req.params.id; + const posts = await DB.getMediaTagPostOfUser(profileid, "@youtube:|@vimeo:|@hls:"); + return res.json({ + status: "ok", + posts + }); + }); + router.get("/video/:id", async (req, res) => { videoId = req.params.id; return res.json([]);