|
|
@@ -35,12 +35,11 @@ export const useSWRxPageList = (
|
|
|
};
|
|
|
|
|
|
|
|
|
-export const useSWRTagsInfo = (pageId: string) : SWRResponse<IPageTagsInfo, Error> => {
|
|
|
+export const useSWRTagsInfo = (pageId: string): SWRResponse<IPageTagsInfo, Error> => {
|
|
|
// apiGet():Promise<unknown>
|
|
|
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
- return useSWR(`/pages.getPageTag?pageId=${pageId}`, endpoint => apiGet(endpoint).then((response: any) => {
|
|
|
+ return useSWR(`/pages.getPageTag?pageId=${pageId}`, endpoint => apiGet(endpoint).then((response: IPageTagsInfo) => {
|
|
|
return {
|
|
|
- tags: response.data.tags,
|
|
|
+ tags: response.tags,
|
|
|
};
|
|
|
}));
|
|
|
};
|