This commit is contained in:
adueck 2023-08-28 15:03:59 +04:00
parent 9dadc7d96f
commit e5e88bb1f3
1 changed files with 3 additions and 2 deletions

View File

@ -66,13 +66,14 @@ export async function getAllLingdocsUsers(): Promise<T.LingdocsUser[]> {
} }
export async function getAllFeedback(): Promise<any[]> { export async function getAllFeedback(): Promise<any[]> {
const { docs } = await feedbackDb.find({ const res = await feedbackDb.find({
selector: { selector: {
feedback: { $exists: true }, feedback: { $exists: true },
limit: 5000, limit: 5000,
}, },
}); });
console.log({ docs }); console.log(res);
const docs = res.docs;
// @ts-ignore // @ts-ignore
docs.sort((a, b) => a.feedback.ts - b.feedback.ts); docs.sort((a, b) => a.feedback.ts - b.feedback.ts);
return docs as any[]; return docs as any[];