working changes to use sequelize auto index
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const db = require('../../config/db.config.js'),
|
||||
const db = require('../../../models'),
|
||||
errorMaker = require('../../helpers/error.maker');
|
||||
|
||||
const { Grant, Cause, Region, Organization } = db;
|
||||
@@ -7,8 +7,10 @@ const { Grant, Cause, Region, Organization } = db;
|
||||
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} });
|
||||
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" });
|
||||
return res.status(200).json({ message: 'Successfully verified charity' });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user