Improve clickable items #45

Merged
bilal.catic merged 5 commits from improve-clickable-items into master 2019-10-15 21:38:48 +02:00
2 changed files with 7 additions and 2 deletions
Showing only changes of commit e0a1444b55 - Show all commits

View File

@@ -66,7 +66,8 @@ const getQueryReview = async (req, res) => {
const searchRequest = await currentSearchRequest(req);
if (!searchRequest || !searchRequest.dataValues) {
return null;
res.render("notFound", { title: " " });
return;
}
const title = "Da li je ovo to što ste tražili ?";

View File

@@ -4,7 +4,11 @@ const sequelize = require("sequelize");
const Op = sequelize.Op;
const getSearchRequest = async searchRequestId => {
return await db.SearchRequest.findByPk(searchRequestId);
try {
return await db.SearchRequest.findByPk(searchRequestId);
} catch (error) {
return null;
}
};
const createSearchRequest = async (searchRequestFields = {}) => {