[defaultDataForPath.js] fix getImagePath query and update object (#334)

path[s] result on findImage returns web paths, we need file path instead.
This commit is contained in:
ThirstilyVague
2024-06-11 14:22:33 -04:00
committed by GitHub
parent 03cd3cbd43
commit dcd9f3abe6

View File

@@ -183,7 +183,11 @@ function getImagePath(ID) {
"\
query findImage($id: ID) {\
findImage(id: $id) {\
path\
visual_files {\
... on ImageFile {\
path\
}\
}\
}\
}";
@@ -197,7 +201,7 @@ query findImage($id: ID) {\
return null;
}
var path = findImage.path;
var path = findImage["visual_files"][0].path;
return path;
}