[server] check that resource exists before adding bookmark

This commit is contained in:
Abhishek Shroff
2024-10-24 00:18:51 +05:30
parent 208f161555
commit 84a8e8cd3f
4 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ func setupBookmarksAddCommand() *cobra.Command {
os.Exit(1)
}
if err := user.CreateManager(context.Background()).AddBookmark(common.User(cmd), r.ID); err != nil {
if err := user.CreateManager(context.Background()).AddBookmark(common.User(cmd), r); err != nil {
fmt.Println("unable to add bookmark: " + err.Error())
os.Exit(1)
}