More work on the API. Primarely defining jsonapi types

This commit is contained in:
Melody Becker 2024-10-30 16:05:20 +01:00
parent 4f4d05a335
commit 0ed50aca60
13 changed files with 165 additions and 48 deletions

View file

@ -31,6 +31,14 @@ func setupLinstromApiV1Router() http.Handler {
// Pinning
router.HandleFunc("POST /note/{noteId}/pin", linstromPinNote)
router.HandleFunc("DELETE /note/{noteId}/pin", linstromUnpinNote)
// Reports
router.HandleFunc("POST /note/{noteId}/report", linstromReportNote)
router.HandleFunc("DELETE /note/{noteId}/report", linstromRetractReportNote)
// Admin
router.HandleFunc("POST /note/{noteId}/admin/cw", linstromForceCWNote)
// Event streams
router.HandleFunc("/streams", linstromEventStream)
return router
}