Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
fix: delete related resources (#415)
Zeng19983aa44f9f6dbd
diff --git a/store/memo.go b/store/memo.goindex b4eec02d4..a6c93161a 100644--- a/store/memo.go+++ b/store/memo.go@@ -222,6 +222,14 @@ func (s *Store) DeleteMemo(ctx context.Context, delete *api.MemoDelete) error {return FormatError(err)}+ resourceDelete := &api.MemoResourceDelete{+ MemoID: delete.ID,+ }++ if err := deleteMemoResource(ctx, tx, resourceDelete); err != nil {+ return FormatError(err)+ }+if err := tx.Commit(); err != nil {return FormatError(err)}