sync for backup

This commit is contained in:
Melody Becker 2024-08-22 19:57:53 +02:00
parent 1fbdf7fc9d
commit a9916acea5
Signed by: mstar
SSH key fingerprint: SHA256:vkXfS9FG2pVNVfvDrzd1VW9n8VJzqqdKQGljxxX8uK8
92 changed files with 35330 additions and 882 deletions

View file

@ -42,3 +42,13 @@ var placeholderNote = &Note{
OriginServer: "placeholder",
Tags: []string{},
}
// Try and find a note with a given ID
func (store *Storage) FindNoteById(id string) (*Note, error) {
note := Note{}
res := store.db.First(&note, id)
if res.Error != nil {
return nil, res.Error
}
return &note, nil
}