feat. 终端主题设置.

This commit is contained in:
lijiahang
2023-12-08 16:40:14 +08:00
parent f68745b80d
commit 73dd7cd3d5
24 changed files with 128 additions and 94 deletions

View File

@@ -13,8 +13,8 @@ export interface PreferenceUpdateRequest {
/**
* 用户偏好查询响应
*/
export interface PreferenceQueryResponse {
config: object;
export interface PreferenceQueryResponse<T> {
config: T;
}
/**
@@ -34,7 +34,7 @@ export function updatePreferencePartial(request: PreferenceUpdateRequest) {
/**
* 查询用户偏好
*/
export function getPreference(type: Preference) {
return axios.get<PreferenceQueryResponse>('/infra/preference/get', { params: { type } });
export function getPreference<T>(type: Preference) {
return axios.get<PreferenceQueryResponse<T>>('/infra/preference/get', { params: { type } });
}