Skip to content

armgit / memos

Public Imported from GitHub
0

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.

chore: fix field syntax

Steven1b105db95855
diff --git a/store/db/sqlite/memo.go b/store/db/sqlite/memo.go
index cbf4fa61f..acfc1b86d 100644
--- a/store/db/sqlite/memo.go
+++ b/store/db/sqlite/memo.go
@@ -105,20 +105,20 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo
orders = append(orders, "id DESC")
fields := []string{
- `memo.id AS id`,
- `memo.creator_id AS creator_id`,
- `memo.created_ts AS created_ts`,
- `memo.updated_ts AS updated_ts`,
- `memo.row_status AS row_status`,
- `memo.visibility AS visibility`,
+ `memo.id AS id,`,
+ `memo.creator_id AS creator_id,`,
+ `memo.created_ts AS created_ts,`,
+ `memo.updated_ts AS updated_ts,`,
+ `memo.row_status AS row_status,`,
+ `memo.visibility AS visibility,`,
}
if !find.ExcludeContent {
- fields = append(fields, `memo.content AS content`)
+ fields = append(fields, `memo.content AS content,`)
}
query := `
SELECT
- ` + strings.Join(fields, ", ") + `
+ ` + strings.Join(fields, "\n") + `
CASE WHEN mo.pinned = 1 THEN 1 ELSE 0 END AS pinned,
(
SELECT