From 20a8bb0467d5328ad1ecdbae8fba6c622bad41c6 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Mon, 30 Oct 2023 13:09:20 +0100 Subject: [PATCH] fix: search being broken on dev through mastodon --- packages/backend/src/core/SearchService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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),