This commit is contained in:
Alessandro Ferro 2024-02-23 12:08:22 +01:00
parent dadaa374bb
commit 5b51c61011
3 changed files with 3 additions and 4 deletions

View File

@ -142,6 +142,6 @@ module.exports = {
organization,
insertOrganization,
updateOrganizationIfAdministrator,
updateOrganizationIfAdministrator,
deleteOrganizationIfAdmin,
deleteOrganizationIfAdmin
};

View File

@ -11,7 +11,6 @@
IN THE SOFTWARE.
*/
const knex = require('../utils/knex_config');
const organization_admin_model = require('../models/organization_admin_model');
/**

View File

@ -36,7 +36,7 @@ async function createOrganizationPost (req, res) {
const insertedOrganization = await organizationPostModel.insertOrganizationPost(organization);
return res.status(200).json(insertedOrganization);
} catch (error) {
console.log('Error while creating Organization Post: ' + error);
console.log(`Error while creating Organization Post: ${error}`);
return res.status(500).json({ error: 'Internal server error' });
}
}
@ -59,7 +59,7 @@ async function deleteOrganizationPost (req, res) {
return res.status(401).json({ error: 'Forbidden' });
}
} catch (error) {
console.log(error);
console.log(`Error while deleting Organization Post: ${error}`);
res.status(500).json({ error: 'Internal server error' });
}
}