From 831abb6dc2a3860524abe5b442bce4b4702a7a65 Mon Sep 17 00:00:00 2001 From: Lea Date: Wed, 9 Aug 2023 21:13:15 +0200 Subject: [PATCH] fix: fetch created reports correctly --- lib/db.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/db.ts b/lib/db.ts index 6911156..d687c06 100644 --- a/lib/db.ts +++ b/lib/db.ts @@ -344,7 +344,7 @@ export async function fetchReportsByUser(userId: string) { .db("revolt") .collection("safety_reports") .find( - { status: "Created", authorId: userId }, + { author_id: userId }, { sort: { _id: -1,