Skip to content

Commit 556f64c

Browse files
committed
avoid the herring
api.js will need some attention
1 parent 5fae31f commit 556f64c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

public/scripts/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ async function importObj(form) {
8181

8282
/**
8383
* Do a PUT update on an existing RERUM object. The resulting object is attributed to this application's RERUM registration agent.
84-
* @see /src/rerm/tokens/tiny.properties ACCESS_TOKEN entry for attribution
84+
* @see /src/rerum/tokens/tiny.properties ACCESS_TOKEN entry for attribution
8585
* @param {type} form
8686
* @param {object} objIn An optional way to pass the new JSON representation as a parameter
8787
*/

routes/update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ router.put('/', async (req, res, next) => {
99
const body = JSON.stringify(req.body)
1010

1111
// check for @id; any value is valid
12-
if (!(body['@id'] ?? body.id)) {
12+
if (!(req.body['@id'] ?? req.body.id)) {
1313
throw Error("No record id to update! (https://centerfordigitalhumanities.github.io/rerum_server/API.html#update)")
1414
}
1515

0 commit comments

Comments
 (0)