Skip to content

Commit

Permalink
Update dataHandlers.js
Browse files Browse the repository at this point in the history
  • Loading branch information
CGDogan committed Sep 11, 2023
1 parent 5717a93 commit def6826
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handlers/dataHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,13 +421,13 @@ FSChanged.added = function(req, res, next) {
var name = path.basename(query.filepath);
fetch("http://ca-load:4000/data/one/" + location).then(r => {
if (!r.ok) {
res.send("SlideLoader error: perhaps the filepath points to an inexistant file?");
res.send({error: "SlideLoader error: perhaps the filepath points to an inexistant file?"});
throw "";
}
return r.json();
}).then(data => {
if (data.error) {
res.send("SlideLoader error: the filepath points to an inexistant file?");
res.send({error: "SlideLoader error: the filepath points to an inexistant file?"});
return;
}
data.filepath = filepath;
Expand Down

0 comments on commit def6826

Please sign in to comment.