public vs general, roles

This commit is contained in:
Arjun Patel
2019-02-27 20:05:33 -08:00
parent 833c87d1ec
commit d14e111f53
13 changed files with 772 additions and 23 deletions
@@ -3,7 +3,12 @@ const db = require('../../config/db.config.js'),
const { Grant, Cause, Region, Organization } = db;
// PUT to change specific org's verify column to true
exports.verifyOrg = (req, res, next) => {
// Verify charity
exports.verifyOrg = async (req, res, next) => {
const charity_id = req.params.charity_id;
await db.sequelize.query("UPDATE organizations SET verified = 1 WHERE id = :charity_id",
{ replacements: {charity_id} });
return res.status(200).json({ message: "Successfully verified charity" });
};