mirror of
https://github.com/halo-dev/halo.git
synced 2025-12-20 16:44:38 +08:00
feat: add requests library as a global shared dependency
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { apiClient } from "@/utils/api-client";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
|
||||
export function useDashboardStats() {
|
||||
const { data } = useQuery({
|
||||
queryKey: ["dashboard-stats"],
|
||||
queryFn: async () => {
|
||||
const { data } = await apiClient.stats.getStats();
|
||||
const { data } = await consoleApiClient.system.getStats();
|
||||
return data;
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user