[server][api] Add /my/bookmarks/list and add routes

This commit is contained in:
Abhishek Shroff
2024-10-23 10:20:54 +05:30
parent 98ea972c38
commit 9514e10455
4 changed files with 59 additions and 20 deletions

View File

@@ -52,7 +52,7 @@ func setupBookmarksListCommand() *cobra.Command {
Short: "List Bookmarks",
Args: cobra.ExactArgs(0),
Run: func(cmd *cobra.Command, args []string) {
if bookmarks, err := user.CreateManager(context.Background()).ListBookmarks(common.User(cmd)); err != nil {
if bookmarks, err := user.CreateManager(context.Background()).Bookmarks(common.User(cmd)); err != nil {
fmt.Println("unable to list bookmark: " + err.Error())
os.Exit(1)
} else {