Skip to content

Commit 9cd1d9c

Browse files
committed
[bugfix] Fixed issue where did was not applied in saving/loading annotations
1 parent a7ca3f7 commit 9cd1d9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dev-server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const handleAnnotation = (req, res, handler) => {
3838

3939
app.get('/annotations', (req, res) => {
4040
handleAnnotation(req, res, (dir) => {
41-
const xfdfFile = (req.query.id) ? path.resolve(dir, req.query.id + '.xfdf') : path.resolve(dir, 'default.xfdf');
41+
const xfdfFile = (req.query.did) ? path.resolve(dir, req.query.did + '.xfdf') : path.resolve(dir, 'default.xfdf');
4242
if (fs.existsSync(xfdfFile)) {
4343
res.header('Content-Type', 'text/xml');
4444
res.send(fs.readFileSync(xfdfFile));
@@ -50,7 +50,7 @@ app.get('/annotations', (req, res) => {
5050

5151
app.post('/annotations', (req, res) => {
5252
handleAnnotation(req, res, (dir) => {
53-
const xfdfFile = (req.body.id) ? path.resolve(dir, req.body.id + '.xfdf') : path.resolve(dir, 'default.xfdf');
53+
const xfdfFile = (req.body.did) ? path.resolve(dir, req.body.did + '.xfdf') : path.resolve(dir, 'default.xfdf');
5454
try {
5555
res.send(fs.writeFileSync(xfdfFile, req.body.data));
5656
} catch(e) {

0 commit comments

Comments
 (0)