(ctx context.DnoteCtx, tx *database.DB, note database.Note, content string)
| 68 | } |
| 69 | |
| 70 | func changeContent(ctx context.DnoteCtx, tx *database.DB, note database.Note, content string) error { |
| 71 | if note.Body == content { |
| 72 | return errors.New("Nothing changed") |
| 73 | } |
| 74 | |
| 75 | if err := database.UpdateNoteContent(tx, ctx.Clock, note.RowID, content); err != nil { |
| 76 | return errors.Wrap(err, "updating the note") |
| 77 | } |
| 78 | |
| 79 | return nil |
| 80 | } |
| 81 | |
| 82 | func moveBook(ctx context.DnoteCtx, tx *database.DB, note database.Note, bookName string) error { |
| 83 | targetBookUUID, err := database.GetBookUUID(tx, bookName) |
no test coverage detected