GetContent gets the content from the UpdateNoteParams
()
| 93 | |
| 94 | // GetContent gets the content from the UpdateNoteParams |
| 95 | func (r UpdateNoteParams) GetContent() string { |
| 96 | if r.Content == nil { |
| 97 | return "" |
| 98 | } |
| 99 | |
| 100 | return *r.Content |
| 101 | } |
| 102 | |
| 103 | // UpdateNote creates a note with the next usn and updates the user's max_usn |
| 104 | func (a *App) UpdateNote(tx *gorm.DB, user database.User, note database.Note, p *UpdateNoteParams) (database.Note, error) { |