Skip to content

Commit 3eef797

Browse files
committed
Merge branch 'refactor-DAPS-1522-Note-Router-Logging-Improvements' of github.com:ORNL/DataFed into refactor-DAPS-1522-Note-Router-Logging-Improvements
2 parents 5021325 + 57ff91b commit 3eef797

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

core/database/foxx/api/note_router.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ router
1919
let result = {};
2020
let doc;
2121
let _key, _rev;
22-
try {
22+
try {
2323
g_db._executeTransaction({
2424
collections: {
2525
read: ["u", "uuid", "accn", "d", "c"],
@@ -99,7 +99,7 @@ router
9999
results: [note.new],
100100
updates: Object.values(updates),
101101
});
102-
({ _key, _rev, ...result } = doc);
102+
({ _key, _rev, ...result } = doc);
103103
logger.logRequestSuccess({
104104
client: client?._id,
105105
correlationId: req.headers["x-correlation-id"],
@@ -144,9 +144,9 @@ router
144144
router
145145
.post("/update", function (req, res) {
146146
let client = null;
147-
let result,doc,_key,_rev;
148-
try {
149-
g_db._executeTransaction({
147+
let result, doc, _key, _rev;
148+
try {
149+
g_db._executeTransaction({
150150
collections: {
151151
read: ["u", "uuid", "accn"],
152152
write: ["d", "n", "note"],
@@ -322,7 +322,7 @@ router
322322
.post("/comment/edit", function (req, res) {
323323
let client = null;
324324
let note = null;
325-
try {
325+
try {
326326
g_db._executeTransaction({
327327
collections: {
328328
read: ["u", "uuid", "accn"],
@@ -336,7 +336,7 @@ router
336336
httpVerb: "POST",
337337
routePath: basePath + "/comment/edit",
338338
status: "Started",
339-
description: "Edit an annotation comment"
339+
description: "Edit an annotation comment",
340340
});
341341

342342
if (!req.queryParams.id.startsWith("n/"))
@@ -518,7 +518,7 @@ router
518518
description: "List annotations by subject",
519519
});
520520

521-
var qry,
521+
var qry,
522522
id = g_lib.resolveDataCollID(req.queryParams.subject, client);
523523

524524
if (!client) {
@@ -563,7 +563,7 @@ router
563563
status: "Failure",
564564
description: "List annotations by subject",
565565
extra: results?._countTotal,
566-
error: e
566+
error: e,
567567
});
568568
g_lib.handleException(e, res);
569569
}

0 commit comments

Comments
 (0)