public vs general, roles
This commit is contained in:
@@ -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" });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user