allowing charities to add ribbons for

This commit is contained in:
Arjun Patel
2019-04-12 14:11:33 -07:00
parent 3756f88cc7
commit 66df6bb576
3 changed files with 106 additions and 106 deletions
+4 -1
View File
@@ -12,7 +12,9 @@ exports.getStatusUpdatesByOrg = async (req, res, next) => {
const posts = await sequelize.query(
`
SELECT * FROM posts
WHERE organization_id = :organization_id`,
WHERE organization_id = :organization_id
ORDER BY created_at DESC
LIMIT 6`,
{
type: db.Sequelize.QueryTypes.SELECT,
replacements: { organization_id }
@@ -70,6 +72,7 @@ exports.addRibbon = async (req, res, next) => {
message: 'Successfully added ribbon to post!'
});
} catch (error) {
console.log(error);
next(error);
}
};