onasty/internal/service/notesrv/input.go (view raw)
Smirnov Olexandr
Smirnov Olexandr
ss2316544@gmail.com fix(api): get note with password (#151)..., 11 months ago
ss2316544@gmail.com fix(api): get note with password (#151)..., 11 months ago
| 1 | package notesrv |
| 2 | |
| 3 | import "github.com/olexsmir/onasty/internal/dtos" |
| 4 | |
| 5 | // GetNoteBySlugInput used as input for [GetBySlugAndRemoveIfNeeded] |
| 6 | type GetNoteBySlugInput struct { |
| 7 | // Slug is a note's slug :) *Required* |
| 8 | Slug dtos.NoteSlug |
| 9 | |
| 10 | // Password is a note's password. |
| 11 | // Leave it `""` if note has no password. |
| 12 | Password string |
| 13 | } |
| 14 | |
| 15 | func (i GetNoteBySlugInput) HasPassword() bool { |
| 16 | return i.Password != "" |
| 17 | } |