implement bookmark tagging

This commit is contained in:
2025-05-21 13:18:16 +01:00
parent f048dee6e2
commit b0d458e5ca
20 changed files with 826 additions and 362 deletions

View File

@@ -1,7 +1,15 @@
import { authenticated, login, logout, signUp } from "./auth/auth.ts"
import { startBackgroundSessionCleanup } from "./auth/session.ts"
import { insertDemoBookmarks } from "./bookmark/bookmark.ts"
import { addBookmark, listUserBookmarks, deleteUserBookmark, fetchBookmark } from "./bookmark/handlers.ts"
import {
addBookmark,
listUserBookmarks,
deleteUserBookmark,
fetchBookmark,
listUserTags,
createUserTag,
listBookmarkTags,
} from "./bookmark/handlers.ts"
import { migrateDatabase } from "./database.ts"
import { httpHandler, preflightHandler } from "./http-handler.ts"
import { createDemoUser } from "./user/user.ts"
@@ -35,6 +43,13 @@ async function main() {
allowedHeaders: ["Accept"],
}),
},
"/api/bookmarks/:id/tags": {
GET: authenticated(listBookmarkTags),
},
"/api/tags": {
GET: authenticated(listUserTags),
POST: authenticated(createUserTag),
},
},
port: 8080,