mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: implement search random memos
This commit is contained in:
@ -82,6 +82,9 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo
|
||||
orders = append(orders, "created_ts DESC")
|
||||
}
|
||||
orders = append(orders, "id DESC")
|
||||
if find.Random {
|
||||
orders = append(orders, "RAND()")
|
||||
}
|
||||
|
||||
fields := []string{
|
||||
`memo.id AS id`,
|
||||
|
Reference in New Issue
Block a user