mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-05 13:10:09 +00:00
feat(header): site name
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
MonitorResponse,
|
||||
ServerGroupResponse,
|
||||
ServiceResponse,
|
||||
SettingResponse,
|
||||
} from "@/types/nezha-api";
|
||||
|
||||
export const fetchServerGroup = async (): Promise<ServerGroupResponse> => {
|
||||
@@ -42,3 +43,12 @@ export const fetchService = async (): Promise<ServiceResponse> => {
|
||||
}
|
||||
return data;
|
||||
};
|
||||
|
||||
export const fetchSetting = async (): Promise<SettingResponse> => {
|
||||
const response = await fetch("/api/v1/setting");
|
||||
const data = await response.json();
|
||||
if (data.error) {
|
||||
throw new Error(data.error);
|
||||
}
|
||||
return data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user