Filter out empty days in days API
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
4e6288455e
commit
60d738a55f
@ -30,7 +30,7 @@ router.get("/*", function(req, res/*, next*/) {
|
|||||||
console.log("Looking for daily photo counts in '" + path + "'");
|
console.log("Looking for daily photo counts in '" + path + "'");
|
||||||
return photoDB.sequelize.query(
|
return photoDB.sequelize.query(
|
||||||
"SELECT DATE(photos.taken) AS date,COUNT(photos.id) AS count FROM albums " +
|
"SELECT DATE(photos.taken) AS date,COUNT(photos.id) AS count FROM albums " +
|
||||||
"JOIN photos ON photos.deleted!=1 AND photos.duplicate=0 AND photos.albumId=albums.id AND photos.taken IS NOT NULL " +
|
"JOIN photos ON photos.deleted!=1 AND photos.duplicate=0 AND photos.taken IS NOT NULL AND photos.albumId=albums.id " +
|
||||||
"WHERE albums.path LIKE :path GROUP BY DATE(photos.taken) ORDER BY date DESC", {
|
"WHERE albums.path LIKE :path GROUP BY DATE(photos.taken) ORDER BY date DESC", {
|
||||||
replacements: {
|
replacements: {
|
||||||
path: path + "%"
|
path: path + "%"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user