Created a system to go directly to an assignment from a URL
This commit is contained in:
@@ -9,3 +9,8 @@ export const getSessionsByUser = async (id: string, limit?: number) =>
|
||||
.find<Session>({user: id})
|
||||
.limit(limit || 0)
|
||||
.toArray();
|
||||
|
||||
export const getSessionByAssignment = async (assignmentID: string) =>
|
||||
await db
|
||||
.collection("sessions")
|
||||
.findOne<Session>({"assignment.id": assignmentID})
|
||||
|
||||
Reference in New Issue
Block a user