Sfoglia il codice sorgente

docs: add update link

poeti8 5 anni fa
parent
commit
0324290654
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  1. 9 0
      server/routes/links.ts

+ 9 - 0
server/routes/links.ts

@@ -28,6 +28,15 @@ router.post(
   asyncHandler(link.create)
 );
 
+router.patch(
+  "/:id",
+  asyncHandler(auth.apikey),
+  asyncHandler(auth.jwtLoose),
+  validators.editLink,
+  asyncHandler(helpers.verify),
+  asyncHandler(link.edit)
+);
+
 router.delete(
   "/:id",
   asyncHandler(auth.apikey),