Migrated the shortener.ts server

This commit is contained in:
Mathias Wagner 2023-11-07 09:17:53 +01:00
parent 4a2155c88f
commit 0482997ec1
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -14,7 +14,7 @@ app.get("*", async (req: Request, res: Response) => {
redirect_url = found.originalUrl; redirect_url = found.originalUrl;
// Increment clicks // Increment clicks
await found.updateOne({$inc: {clicks: 1}}).exec(); await found.increment({clicks: +1});
} }
// Redirect to url // Redirect to url