adminforth 1.1.16 → 1.1.17

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.
@@ -139,7 +139,7 @@ async function saveRecord() {
139
139
  });
140
140
  if (response.error) {
141
141
  window.adminforth.alert({
142
- message: resp.error,
142
+ message: response.error,
143
143
  variant: 'danger',
144
144
  timeout: 'unlimited',
145
145
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "1.1.16",
3
+ "version": "1.1.17",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -5,10 +5,11 @@ import { AllowedActionsEnum, AdminUser } from '../../types/AdminForthConfig.js';
5
5
  export type PluginOptions = {
6
6
  /**
7
7
  * Called to check if user has access to a page
8
+ * Should return `true` if user has access. If user has no access, return `false` or a string with an error message
8
9
  * @param user - The user object
9
10
  * @param page - The page to check access for
10
11
  * @param meta - The meta object containing query for list/show or record for save/edit
11
- * @returns true if user has access, false or a string with an error message
12
+ * @returns {boolean | string} -
12
13
  */
13
14
  hasAccess: (user: AdminUser, page: AllowedActionsEnum, meta: any) => Promise<boolean | string>;
14
15
  }
@@ -139,7 +139,7 @@ async function saveRecord() {
139
139
  });
140
140
  if (response.error) {
141
141
  window.adminforth.alert({
142
- message: resp.error,
142
+ message: response.error,
143
143
  variant: 'danger',
144
144
  timeout: 'unlimited',
145
145
  })