@adminforth/i18n 2.0.25 → 2.0.27

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 CHANGED
@@ -20,5 +20,5 @@ custom/package.json
20
20
  custom/pnpm-lock.yaml
21
21
  custom/tsconfig.json
22
22
 
23
- sent 45,257 bytes received 305 bytes 91,124.00 bytes/sec
23
+ sent 45,262 bytes received 305 bytes 91,134.00 bytes/sec
24
24
  total size is 44,110 speedup is 0.97
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.25",
3
+ "version": "2.0.27",
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.1.1"
41
+ "adminforth": "^3.1.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/node": "^22.10.7",
45
- "adminforth": "^3.1.1",
45
+ "adminforth": "^3.1.0",
46
46
  "i18n-iso-countries": "^7.13.0",
47
47
  "semantic-release": "^24.2.1",
48
48
  "semantic-release-slack-bot": "^4.0.2",