Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion controllers/postController.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports.createPost = async (req, res, next) => {
const user = res.locals.user;
const { caption, filter: filterName } = req.body;
let post = undefined;
let response = undefined;
const filterObject = filters.find((filter) => filter.name === filterName);
const hashtags = [];
linkify.find(caption).forEach((result) => {
Expand All @@ -43,7 +44,7 @@ module.exports.createPost = async (req, res, next) => {
});

try {
const response = await cloudinary.uploader.upload(req.file.path);
response = await cloudinary.uploader.upload(req.file.path);
} catch {
return next({ message: 'Error uploading image, please try again later.' });
}
Expand Down