[优化] 自动发现接入

This commit is contained in:
ryan
2026-03-12 17:01:47 +08:00
parent ee539d9b67
commit 3a178473d5
3 changed files with 151 additions and 7 deletions
@@ -1,6 +1,7 @@
import { apiRequest } from '@/lib/api/client';
import type {
BootstrapTokenPayload,
OptionItem,
SettingsProfile,
UpdateSelfPayload,
@@ -17,6 +18,16 @@ export function updateOption(key: string, value: string) {
});
}
export function getBootstrapToken() {
return apiRequest<BootstrapTokenPayload>('/nodes/bootstrap-token');
}
export function rotateBootstrapToken() {
return apiRequest<BootstrapTokenPayload>('/nodes/bootstrap-token/rotate', {
method: 'POST',
});
}
export function getSettingsProfile() {
return apiRequest<SettingsProfile>('/user/self');
}