implement bookmark tagging
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user