@dnax/core 0.70.8 → 0.71.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/hono.ts +40 -16
- package/driver/mongo/rest.ts +2 -1
- package/package.json +1 -1
package/app/hono.ts
CHANGED
|
@@ -385,15 +385,26 @@ function HonoInstance(): typeof app {
|
|
|
385
385
|
responseAuth
|
|
386
386
|
) {
|
|
387
387
|
rest.activity.save({
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
388
|
+
operation: {
|
|
389
|
+
status: "done",
|
|
390
|
+
type: "authCollection",
|
|
391
|
+
target: collection,
|
|
392
|
+
user: sessionStorage().get().state?.user,
|
|
393
|
+
role: sessionStorage().get().role,
|
|
394
|
+
state: sessionStorage().get().state,
|
|
395
|
+
transaction: false,
|
|
396
|
+
internal: false,
|
|
397
|
+
uuid: sessionStorage().get()?.uuid || "",
|
|
398
|
+
payload: {
|
|
399
|
+
input: body,
|
|
400
|
+
data: body,
|
|
401
|
+
},
|
|
402
|
+
auth: true,
|
|
403
|
+
performedBy: {
|
|
404
|
+
user: sessionStorage().get().state?.user,
|
|
405
|
+
role: sessionStorage().get()?.role!,
|
|
406
|
+
},
|
|
391
407
|
},
|
|
392
|
-
action: "authCollection",
|
|
393
|
-
auth: true,
|
|
394
|
-
transaction: false,
|
|
395
|
-
role: sessionStorage().get().role || null,
|
|
396
|
-
user: sessionStorage().get().state?.user,
|
|
397
408
|
state: sessionStorage().get().state,
|
|
398
409
|
uuid: sessionStorage().get().uuid,
|
|
399
410
|
ip:
|
|
@@ -410,16 +421,29 @@ function HonoInstance(): typeof app {
|
|
|
410
421
|
});
|
|
411
422
|
} else {
|
|
412
423
|
rest.activity.save({
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
424
|
+
operation: {
|
|
425
|
+
status: "failed",
|
|
426
|
+
type: "authCollection",
|
|
427
|
+
target: collection,
|
|
428
|
+
user: sessionStorage().get().state?.user,
|
|
429
|
+
role: sessionStorage().get().role,
|
|
430
|
+
state: sessionStorage().get().state,
|
|
431
|
+
transaction: false,
|
|
432
|
+
internal: false,
|
|
433
|
+
uuid: sessionStorage().get()?.uuid || "",
|
|
434
|
+
payload: {
|
|
435
|
+
input: body,
|
|
436
|
+
data: body,
|
|
437
|
+
},
|
|
438
|
+
auth: true,
|
|
439
|
+
performedBy: {
|
|
440
|
+
user: sessionStorage().get().state?.user,
|
|
441
|
+
role: sessionStorage().get()?.role || null,
|
|
442
|
+
},
|
|
416
443
|
},
|
|
417
|
-
|
|
418
|
-
action: "authCollection",
|
|
419
|
-
auth: false,
|
|
420
|
-
user: sessionStorage().get().state?.user,
|
|
444
|
+
|
|
421
445
|
state: sessionStorage().get().state,
|
|
422
|
-
|
|
446
|
+
|
|
423
447
|
uuid: sessionStorage().get().uuid,
|
|
424
448
|
ip:
|
|
425
449
|
c.req.raw.headers?.get("CF-Connecting-IP") ||
|
package/driver/mongo/rest.ts
CHANGED
|
@@ -83,6 +83,7 @@ const omitUpdate = [
|
|
|
83
83
|
type activityInput = {
|
|
84
84
|
collection?: string;
|
|
85
85
|
operation: {
|
|
86
|
+
status?: "done" | "failed";
|
|
86
87
|
uuid: string;
|
|
87
88
|
type: string;
|
|
88
89
|
auth?: boolean;
|
|
@@ -96,7 +97,7 @@ type activityInput = {
|
|
|
96
97
|
timestamp?: Date;
|
|
97
98
|
performedBy?: {
|
|
98
99
|
user?: object;
|
|
99
|
-
role?: string;
|
|
100
|
+
role?: string | null;
|
|
100
101
|
};
|
|
101
102
|
payload?: {
|
|
102
103
|
update?: any;
|