Adding debug info
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
e320428e51
commit
3614a90ae3
@ -55,11 +55,15 @@ router.get("/*", function(req, res/*, next*/) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let query = "SELECT * FROM photos WHERE path LIKE :path " + index + " ORDER BY taken " + order + ",id " + order + " LIMIT " + (limit * 2 + 1);
|
let path = decodeURI(req.url).replace(/\?.*$/, ""),
|
||||||
|
query = "SELECT * FROM photos WHERE path LIKE :path " + index + " ORDER BY taken " + order + ",id " + order + " LIMIT " + (limit * 2 + 1);
|
||||||
|
|
||||||
|
console.log("Fetching from: " + path);
|
||||||
|
|
||||||
return photoDB.sequelize.query(query, {
|
return photoDB.sequelize.query(query, {
|
||||||
replacements: {
|
replacements: {
|
||||||
cursor: cursor,
|
cursor: cursor,
|
||||||
path: decodeURI(req.url).replace(/\?.*$/, "") + "%"
|
path: path + "%"
|
||||||
},
|
},
|
||||||
type: photoDB.Sequelize.QueryTypes.SELECT
|
type: photoDB.Sequelize.QueryTypes.SELECT
|
||||||
}).then(function(photos) {
|
}).then(function(photos) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user