From 99bc453110bb8e043b4f1a3e67ec48da0e2ca8da Mon Sep 17 00:00:00 2001 From: xfarrow Date: Wed, 14 Feb 2024 10:53:20 +0100 Subject: [PATCH] Update api_controller.js --- backend/apis/nodejs/api_controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/apis/nodejs/api_controller.js b/backend/apis/nodejs/api_controller.js index e1b3b53..c200941 100644 --- a/backend/apis/nodejs/api_controller.js +++ b/backend/apis/nodejs/api_controller.js @@ -62,7 +62,7 @@ async function registerPerson(req, res){ display_name: req.body.display_name, date_of_birth: req.body.date_of_birth, available: req.body.available, - enabled: true, + enabled: true, // Change this in production place_of_living: req.body.place_of_living }) .returning("id"); @@ -424,7 +424,7 @@ async function removeOrganizationAdmin(req, res){ // Delete Organization if there are no admins left. // TODO: If the user instead deletes their entire profile, the organization will not be deleted. Fix. - // TODO: Check what level of transaction we are using to avoid inconsistencies + // TODO: Check what level of transaction we are using to avoid inconsistencies. Update: it is READ COMMITTED see https://www.geeksforgeeks.org/transaction-isolation-levels-dbms/ const count = await trx('OrganizationAdministrator') .count('id as count') .where('id', req.body.organization_id);