Skip to content

Commit 4e5f1eb

Browse files
committed
docs(script): 归位被安装令牌 hook 挤开的用户组列表注释
useScriptInstallToken 插在了 useScriptGroupList 的 JSDoc 与其声明之间, "脚本用户组列表Hook"那段注释于是挂到了安装令牌 hook 头上。把新 hook 移到 useScriptGroupList 之后,两段注释各归其位。
1 parent 0d3b060 commit 4e5f1eb

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

src/lib/api/hooks/script.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,19 @@ export function useAccessRoleList(id: number, page: number = 1) {
9090
* @param page - 页码
9191
* @returns 脚本用户组列表数据
9292
*/
93+
export function useScriptGroupList(id: number, page: number = 1) {
94+
const key = ['script-group-list', id, page];
95+
96+
return useSWR<ListData<ScriptGroup>, APIError>(
97+
key,
98+
() => scriptAccessService.getScriptGroupList(id, page),
99+
{
100+
revalidateOnFocus: false,
101+
revalidateOnReconnect: false,
102+
},
103+
);
104+
}
105+
93106
/**
94107
* 取私有脚本的安装令牌。
95108
*
@@ -107,19 +120,6 @@ export function useScriptInstallToken(scriptId: number, enabled: boolean) {
107120
);
108121
}
109122

110-
export function useScriptGroupList(id: number, page: number = 1) {
111-
const key = ['script-group-list', id, page];
112-
113-
return useSWR<ListData<ScriptGroup>, APIError>(
114-
key,
115-
() => scriptAccessService.getScriptGroupList(id, page),
116-
{
117-
revalidateOnFocus: false,
118-
revalidateOnReconnect: false,
119-
},
120-
);
121-
}
122-
123123
/**
124124
* 用户组成员列表Hook
125125
* @param id - 脚本ID

0 commit comments

Comments
 (0)