mirror of https://github.com/halo-dev/halo-admin
perf: mute the fetch roles request (#857)
#### What type of PR is this? /kind improvement #### What this PR does / why we need it: 静默请求所有角色信息,用于显示 displayName。(临时解决方案) #### Does this PR introduce a user-facing change? ```release-note None ```pull/854/head^2
parent
aca67f683c
commit
fe353a472f
|
@ -14,11 +14,14 @@ export const useRoleStore = defineStore("role", () => {
|
|||
|
||||
async function fetchRoles() {
|
||||
try {
|
||||
const { data } = await apiClient.extension.role.listv1alpha1Role({
|
||||
page: 0,
|
||||
size: 0,
|
||||
labelSelector: [`!${roleLabels.TEMPLATE}`],
|
||||
});
|
||||
const { data } = await apiClient.extension.role.listv1alpha1Role(
|
||||
{
|
||||
page: 0,
|
||||
size: 0,
|
||||
labelSelector: [`!${roleLabels.TEMPLATE}`],
|
||||
},
|
||||
{ mute: true }
|
||||
);
|
||||
roles.value = data.items;
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch roles", error);
|
||||
|
|
Loading…
Reference in New Issue