diff --git a/api/routes/links.ts b/api/routes/links.ts index 625ed47..974f9ce 100644 --- a/api/routes/links.ts +++ b/api/routes/links.ts @@ -7,6 +7,10 @@ import {ShortenedLink} from "../../models/ShortenedLink"; const app = Router(); +app.get("/", hasRank(Rank.TEAM_MEMBER), async (req: AuthenticatedRequest, res: Response) => { + res.json(await ShortenedLink.find({}, {_id: 0, __v: 0})); +}); + app.get("/:code", hasRank(Rank.TEAM_MEMBER), async (req: AuthenticatedRequest, res: Response) => { if (!req.params.code) return res.status(400).json({message: "You need to provide the shorten id"});