(p createNotePayload)
| 191 | } |
| 192 | |
| 193 | func validateCreateNotePayload(p createNotePayload) error { |
| 194 | if p.BookUUID == "" { |
| 195 | return app.ErrBookUUIDRequired |
| 196 | } |
| 197 | |
| 198 | return nil |
| 199 | } |
| 200 | |
| 201 | func (n *Notes) create(r *http.Request) (database.Note, error) { |
| 202 | user := context.User(r.Context()) |