ref(command_names): gave commands proper names
This commit is contained in:
parent
c0591b6c7e
commit
f5f0204147
3 changed files with 6 additions and 3 deletions
|
|
@ -16,8 +16,9 @@ func main() {
|
|||
logging.Init()
|
||||
server := server.NewServer()
|
||||
|
||||
server.RegisterHandler("initialize", vault.NewInitializeHandler())
|
||||
server.RegisterHandler("create_note", note.NewCreateNoteHandler())
|
||||
server.RegisterHandler("vault/init", vault.NewInitializeHandler())
|
||||
server.RegisterHandler("note/create", note.NewCreateNoteHandler())
|
||||
server.RegisterHandler("note/save", note.NewSaveNoteHandler())
|
||||
server.RegisterHandler("completion/link", completion.NewCompleteLinkHandler())
|
||||
|
||||
if err := server.Run(os.Stdin, os.Stdout); err != nil {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ func (h *SaveNoteHandler) Handle(ctx context.Context, raw json.RawMessage) (any,
|
|||
}
|
||||
|
||||
defer h.uow.Rollback()
|
||||
tagRepo := repositories.NewTagRepository(tx)
|
||||
noteRepo := repositories.NewNoteRepository(tx)
|
||||
|
||||
|
||||
|
|
@ -47,6 +46,8 @@ func (h *SaveNoteHandler) Handle(ctx context.Context, raw json.RawMessage) (any,
|
|||
return nil, err
|
||||
}
|
||||
|
||||
println("Saving note:", note.Title(), "at path:", note.Path())
|
||||
|
||||
|
||||
|
||||
return nil, nil
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
|
||||
type NoteRepository interface {
|
||||
Insert(ctx context.Context, note *models.Note) error
|
||||
GetBySlug(ctx context.Context, slug string) (*models.Note, error)
|
||||
}
|
||||
|
||||
type noteRepository struct {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue