@adminforth/i18n 2.0.26 → 2.0.28
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/build.log +1 -1
- package/dist/index.js +3 -0
- package/index.ts +3 -1
- package/package.json +3 -3
package/build.log
CHANGED
package/dist/index.js
CHANGED
|
@@ -1023,6 +1023,9 @@ export default class I18nPlugin extends AdminForthPlugin {
|
|
|
1023
1023
|
path: `/plugin/${this.pluginInstanceId}/update-field`,
|
|
1024
1024
|
handler: (_a) => __awaiter(this, [_a], void 0, function* ({ body, adminUser, headers }) {
|
|
1025
1025
|
const { resourceId, recordId, field, value, reviewed } = body;
|
|
1026
|
+
if (resourceId !== this.resourceConfig.resourceId) {
|
|
1027
|
+
return { error: 'Invalid resourceId' };
|
|
1028
|
+
}
|
|
1026
1029
|
const resource = this.adminforth.config.resources.find(r => r.resourceId === resourceId);
|
|
1027
1030
|
// Create update object with just the single field
|
|
1028
1031
|
const updateRecord = { [field]: value };
|
package/index.ts
CHANGED
|
@@ -1254,7 +1254,9 @@ export default class I18nPlugin extends AdminForthPlugin {
|
|
|
1254
1254
|
path: `/plugin/${this.pluginInstanceId}/update-field`,
|
|
1255
1255
|
handler: async ({ body, adminUser, headers }) => {
|
|
1256
1256
|
const { resourceId, recordId, field, value, reviewed } = body;
|
|
1257
|
-
|
|
1257
|
+
if (resourceId !== this.resourceConfig.resourceId) {
|
|
1258
|
+
return { error: 'Invalid resourceId' };
|
|
1259
|
+
}
|
|
1258
1260
|
const resource = this.adminforth.config.resources.find(r => r.resourceId === resourceId);
|
|
1259
1261
|
// Create update object with just the single field
|
|
1260
1262
|
const updateRecord = { [field]: value };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adminforth/i18n",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.28",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"p-limit": "^7.3.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"adminforth": "^3.
|
|
41
|
+
"adminforth": "^3.6.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/node": "^22.10.7",
|
|
45
|
-
"adminforth": "^3.
|
|
45
|
+
"adminforth": "^3.6.2",
|
|
46
46
|
"i18n-iso-countries": "^7.13.0",
|
|
47
47
|
"semantic-release": "^24.2.1",
|
|
48
48
|
"semantic-release-slack-bot": "^4.0.2",
|