summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/SearchService.ts
diff options
context:
space:
mode:
authorMar0xy <marie@kaifa.ch>2023-10-30 13:09:20 +0100
committerMar0xy <marie@kaifa.ch>2023-10-30 13:09:20 +0100
commit20a8bb0467d5328ad1ecdbae8fba6c622bad41c6 (patch)
treef98e58ea39d7bb67e75abfb88a007034d91e4154 /packages/backend/src/core/SearchService.ts
parentfix: deleting a list returning an error as success (diff)
downloadsharkey-20a8bb0467d5328ad1ecdbae8fba6c622bad41c6.tar.gz
sharkey-20a8bb0467d5328ad1ecdbae8fba6c622bad41c6.tar.bz2
sharkey-20a8bb0467d5328ad1ecdbae8fba6c622bad41c6.zip
fix: search being broken on dev through mastodon
Diffstat (limited to 'packages/backend/src/core/SearchService.ts')
-rw-r--r--packages/backend/src/core/SearchService.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/backend/src/core/SearchService.ts b/packages/backend/src/core/SearchService.ts
index 6103b0e0f6..ccdee87b13 100644
--- a/packages/backend/src/core/SearchService.ts
+++ b/packages/backend/src/core/SearchService.ts
@@ -183,7 +183,7 @@ export class SearchService {
}
}
const res = await this.meilisearchNoteIndex!.search(q, {
- sort: [`createdAt:${opts.order}`],
+ sort: [`createdAt:${opts.order ? opts.order : 'desc'}`],
matchingStrategy: 'all',
attributesToRetrieve: ['id', 'createdAt'],
filter: compileQuery(filter),