mirror of
https://github.com/fatedier/frp.git
synced 2026-01-11 22:23:12 +00:00
web/frpc: refactor dashboard with improved structure and API layer (#5117)
This commit is contained in:
18
web/frpc/src/api/frpc.ts
Normal file
18
web/frpc/src/api/frpc.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { http } from './http'
|
||||
import type { StatusResponse } from '../types/proxy'
|
||||
|
||||
export const getStatus = () => {
|
||||
return http.get<StatusResponse>('/api/status')
|
||||
}
|
||||
|
||||
export const getConfig = () => {
|
||||
return http.get<string>('/api/config')
|
||||
}
|
||||
|
||||
export const putConfig = (content: string) => {
|
||||
return http.put<void>('/api/config', content)
|
||||
}
|
||||
|
||||
export const reloadConfig = () => {
|
||||
return http.get<void>('/api/reload')
|
||||
}
|
||||
Reference in New Issue
Block a user