Solved a problem with the assignees stuff related to the query
This commit is contained in:
@@ -30,7 +30,7 @@ export const getAssignment = async (id: string) => {
|
|||||||
export const getAssignmentsByAssignee = async (id: string, filter?: { [key in keyof Partial<Assignment>]: any }) => {
|
export const getAssignmentsByAssignee = async (id: string, filter?: { [key in keyof Partial<Assignment>]: any }) => {
|
||||||
return await db
|
return await db
|
||||||
.collection("assignments")
|
.collection("assignments")
|
||||||
.find<Assignment>({assignees: [id], ...(!filter ? {} : filter)})
|
.find<Assignment>({ assignees: id, ...(!filter ? {} : filter) })
|
||||||
.toArray();
|
.toArray();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user