mirror of
https://github.com/ConvoyPanel/panel.git
synced 2026-06-11 06:20:47 +08:00
19 lines
430 B
TypeScript
19 lines
430 B
TypeScript
import http from '@/api/http'
|
|
|
|
export interface AuthSettings {
|
|
sshKeys: string
|
|
}
|
|
|
|
const rawDataToAuthSettings = (data: any): AuthSettings => ({
|
|
sshKeys: data.ssh_keys,
|
|
})
|
|
|
|
const getAuthSettings = async (uuid: string): Promise<AuthSettings> => {
|
|
const {
|
|
data: { data },
|
|
} = await http.get(`/api/client/servers/${uuid}/settings/auth`)
|
|
|
|
return rawDataToAuthSettings(data)
|
|
}
|
|
|
|
export default getAuthSettings |