make access confidential when user submits exam with approval process. make access private upon approval workflow completed.
This commit is contained in:
@@ -78,8 +78,8 @@ async function POST(req: NextApiRequest, res: NextApiResponse) {
|
||||
throw new Error("Name already exists");
|
||||
}
|
||||
|
||||
if (isAdmin(user)) {
|
||||
exam.isDiagnostic = false;
|
||||
if (exam.requiresApproval === true) {
|
||||
exam.access = "confidential";
|
||||
}
|
||||
|
||||
await db.collection(module).updateOne(
|
||||
|
||||
Reference in New Issue
Block a user