Fix the rel-entity-linker pep.j2

This commit is contained in:
Andrea Dell'Amico 2023-05-03 17:03:09 +02:00
parent 660e65d712
commit cb0c6d75e9
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ function enforce(r) {
}).then(reply=>{
debug(context, "[REL] response status: " + reply.status)
closeAccountingRecord(context.record, (reply.status === 200 || reply.status === 201 || reply.status === 204))
context.request.subrequest("/_accounting", { detached : true, body : JSON.stringify(context.record) })
context.request.subrequest("/_accounting", { detached : true, body : JSON.stringify([context.record]) })
r.return(reply.status, reply.responseBody)
}).catch(e => { log(context, "Error .... " + njs.dump(e)); context.request.return(e.message === "Unauthorized" ? 403 : 500)} )