mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
minor, finish bookmark functionality
This commit is contained in:
@@ -176,7 +176,7 @@ func init() {
|
|||||||
|
|
||||||
registerCmdFn("bookmarks:show", BookmarksShowCommand)
|
registerCmdFn("bookmarks:show", BookmarksShowCommand)
|
||||||
|
|
||||||
registerCmdFn("bookmark:edit", BookmarkEditCommand)
|
registerCmdFn("bookmark:set", BookmarkSetCommand)
|
||||||
registerCmdFn("bookmark:delete", BookmarkDeleteCommand)
|
registerCmdFn("bookmark:delete", BookmarkDeleteCommand)
|
||||||
|
|
||||||
registerCmdFn("_killserver", KillServerCommand)
|
registerCmdFn("_killserver", KillServerCommand)
|
||||||
@@ -1924,9 +1924,9 @@ func BookmarksShowCommand(ctx context.Context, pk *scpacket.FeCommandPacketType)
|
|||||||
return update, nil
|
return update, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func BookmarkEditCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) (sstore.UpdatePacket, error) {
|
func BookmarkSetCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) (sstore.UpdatePacket, error) {
|
||||||
if len(pk.Args) == 0 {
|
if len(pk.Args) == 0 {
|
||||||
return nil, fmt.Errorf("/bookmark:delete requires one argument (bookmark id)")
|
return nil, fmt.Errorf("/bookmark:set requires one argument (bookmark id)")
|
||||||
}
|
}
|
||||||
bookmarkArg := pk.Args[0]
|
bookmarkArg := pk.Args[0]
|
||||||
bookmarkId, err := sstore.GetBookmarkIdByArg(ctx, bookmarkArg)
|
bookmarkId, err := sstore.GetBookmarkIdByArg(ctx, bookmarkArg)
|
||||||
|
|||||||
Reference in New Issue
Block a user