Fix loading / album
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
8e75b73db1
commit
bbe87a9456
@ -700,6 +700,7 @@
|
|||||||
window.fetch("api/v1/albums" + (this.path || ""), function(error, xhr) {
|
window.fetch("api/v1/albums" + (this.path || ""), function(error, xhr) {
|
||||||
this.loadingAlbums = false;
|
this.loadingAlbums = false;
|
||||||
if (error) {
|
if (error) {
|
||||||
|
console.log("Error loading album: " + (this.path || ""));
|
||||||
console.error(JSON.stringify(error, null, 2));
|
console.error(JSON.stringify(error, null, 2));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -18,10 +18,6 @@ router.get("/*", function(req, res/*, next*/) {
|
|||||||
let url = decodeURI(req.url).replace(/\?.*$/, ""),
|
let url = decodeURI(req.url).replace(/\?.*$/, ""),
|
||||||
query = "SELECT * FROM albums WHERE path=:path";
|
query = "SELECT * FROM albums WHERE path=:path";
|
||||||
|
|
||||||
if (url == "/") {
|
|
||||||
url = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
return photoDB.sequelize.query(query, {
|
return photoDB.sequelize.query(query, {
|
||||||
replacements: {
|
replacements: {
|
||||||
path: url
|
path: url
|
||||||
|
Loading…
x
Reference in New Issue
Block a user