From 35b1e1c66300eb54a715ef21c6a91452a64e5b94 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Tue, 19 Nov 2024 09:04:40 +0100 Subject: [PATCH] bugfixing: remove endpoint --- src/routes/api/edit-name-watchlist/+server.ts | 29 ------------------- 1 file changed, 29 deletions(-) delete mode 100644 src/routes/api/edit-name-watchlist/+server.ts diff --git a/src/routes/api/edit-name-watchlist/+server.ts b/src/routes/api/edit-name-watchlist/+server.ts deleted file mode 100644 index eb8071d6..00000000 --- a/src/routes/api/edit-name-watchlist/+server.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Declare a route -module.exports = function (fastify, opts, done) { - - const pb = opts.pb; - - fastify.post('/edit-name-watchlist', async (request, reply) => { - const data = request.body; - const watchListId = data?.watchListId; - const newTitle = data?.title; - - let output; - - try { - await pb.collection("watchlist").update(watchListId, { - 'title': newTitle - }) - output = 'success'; - } - catch(e) { - //console.log(e) - output = 'failure'; - } - - reply.send({ items: output }) - - }); - - done(); -}; \ No newline at end of file