mirror of https://github.com/xfarrow/blink
update
This commit is contained in:
parent
dadaa374bb
commit
5b51c61011
|
@ -142,6 +142,6 @@ module.exports = {
|
||||||
organization,
|
organization,
|
||||||
insertOrganization,
|
insertOrganization,
|
||||||
updateOrganizationIfAdministrator,
|
updateOrganizationIfAdministrator,
|
||||||
updateOrganizationIfAdministrator,
|
deleteOrganizationIfAdmin,
|
||||||
deleteOrganizationIfAdmin
|
deleteOrganizationIfAdmin
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
IN THE SOFTWARE.
|
IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const knex = require('../utils/knex_config');
|
|
||||||
const organization_admin_model = require('../models/organization_admin_model');
|
const organization_admin_model = require('../models/organization_admin_model');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -36,7 +36,7 @@ async function createOrganizationPost (req, res) {
|
||||||
const insertedOrganization = await organizationPostModel.insertOrganizationPost(organization);
|
const insertedOrganization = await organizationPostModel.insertOrganizationPost(organization);
|
||||||
return res.status(200).json(insertedOrganization);
|
return res.status(200).json(insertedOrganization);
|
||||||
} catch (error) {
|
} 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' });
|
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' });
|
return res.status(401).json({ error: 'Forbidden' });
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(`Error while deleting Organization Post: ${error}`);
|
||||||
res.status(500).json({ error: 'Internal server error' });
|
res.status(500).json({ error: 'Internal server error' });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue