@hostlink/nuxt-light 1.54.0 → 1.54.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/dist/module.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed } from "vue";
|
|
2
2
|
import useLight from "./useLight.js";
|
|
3
|
-
import
|
|
3
|
+
import { query } from "@hostlink/light";
|
|
4
4
|
export default function useRoles() {
|
|
5
5
|
const light = useLight();
|
|
6
6
|
const roles = computed(() => light.myRoles || []);
|
|
@@ -19,9 +19,9 @@ export default function useRoles() {
|
|
|
19
19
|
return wanted.every((r) => light.myRoles.includes(r));
|
|
20
20
|
}
|
|
21
21
|
async function reload() {
|
|
22
|
-
const data = await
|
|
22
|
+
const data = await query({
|
|
23
23
|
my: {
|
|
24
|
-
roles
|
|
24
|
+
roles: true
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
const newRoles = (data?.my?.roles || []).map((r) => r.role || r);
|