@growy/strapi-plugin-encrypted-field 2.1.8 → 2.1.9
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.
|
@@ -66,7 +66,7 @@ const Input = (props) => {
|
|
|
66
66
|
|
|
67
67
|
const logAudit = async (action, fieldName, fieldValue) => {
|
|
68
68
|
try {
|
|
69
|
-
const response = await fetch('/
|
|
69
|
+
const response = await fetch('/encrypted-field/audit-logs/log', {
|
|
70
70
|
method: 'POST',
|
|
71
71
|
headers: {
|
|
72
72
|
'Content-Type': 'application/json',
|
|
@@ -11,7 +11,7 @@ const AuditLogs = () => {
|
|
|
11
11
|
const fetchLogs = async (page = 1) => {
|
|
12
12
|
try {
|
|
13
13
|
setLoading(true);
|
|
14
|
-
const response = await fetch(`/
|
|
14
|
+
const response = await fetch(`/encrypted-field/audit-logs?page=${page}&pageSize=${pagination.pageSize}`);
|
|
15
15
|
|
|
16
16
|
if (response.ok) {
|
|
17
17
|
const data = await response.json();
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
const register = require('./register');
|
|
2
2
|
const bootstrap = require('./bootstrap');
|
|
3
3
|
const decrypt = require('./middlewares/decrypt');
|
|
4
|
+
const auditLogController = require('./controllers/audit-log');
|
|
5
|
+
const auditLogRoutes = require('./routes/audit-log');
|
|
4
6
|
|
|
5
7
|
module.exports = {
|
|
6
8
|
register,
|
|
7
9
|
bootstrap,
|
|
10
|
+
controllers: {
|
|
11
|
+
'audit-log': auditLogController,
|
|
12
|
+
},
|
|
13
|
+
routes: auditLogRoutes,
|
|
8
14
|
middlewares: {
|
|
9
15
|
decrypt,
|
|
10
16
|
},
|
package/server/register.js
CHANGED
|
@@ -1,30 +1,20 @@
|
|
|
1
|
-
module.exports =
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
policies: [],
|
|
11
|
-
middlewares: []
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
]
|
|
1
|
+
module.exports = [
|
|
2
|
+
{
|
|
3
|
+
method: 'POST',
|
|
4
|
+
path: '/audit-logs/log',
|
|
5
|
+
handler: 'audit-log.log',
|
|
6
|
+
config: {
|
|
7
|
+
policies: [],
|
|
8
|
+
auth: false,
|
|
9
|
+
}
|
|
15
10
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
policies: [],
|
|
25
|
-
middlewares: []
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
]
|
|
11
|
+
{
|
|
12
|
+
method: 'GET',
|
|
13
|
+
path: '/audit-logs',
|
|
14
|
+
handler: 'audit-log.getLogs',
|
|
15
|
+
config: {
|
|
16
|
+
policies: [],
|
|
17
|
+
auth: false,
|
|
18
|
+
}
|
|
29
19
|
}
|
|
30
|
-
|
|
20
|
+
];
|