feat(frontend): add config types and API client for file-config endpoints
- types/config.ts: TypeScript interfaces for ActionConfig, FilterConfig, JailFileConfig, ConfFileContent, and related request/response shapes - api/config.ts: typed API functions for reading and writing conf files - api/endpoints.ts: add /config/file/* endpoint constants
This commit is contained in:
@@ -76,10 +76,16 @@ export const ENDPOINTS = {
|
||||
`/config/jail-files/${encodeURIComponent(filename)}`,
|
||||
configJailFileEnabled: (filename: string): string =>
|
||||
`/config/jail-files/${encodeURIComponent(filename)}/enabled`,
|
||||
configJailFileParsed: (filename: string): string =>
|
||||
`/config/jail-files/${encodeURIComponent(filename)}/parsed`,
|
||||
configFilters: "/config/filters",
|
||||
configFilter: (name: string): string => `/config/filters/${encodeURIComponent(name)}`,
|
||||
configFilterParsed: (name: string): string =>
|
||||
`/config/filters/${encodeURIComponent(name)}/parsed`,
|
||||
configActions: "/config/actions",
|
||||
configAction: (name: string): string => `/config/actions/${encodeURIComponent(name)}`,
|
||||
configActionParsed: (name: string): string =>
|
||||
`/config/actions/${encodeURIComponent(name)}/parsed`,
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Server settings
|
||||
|
||||
Reference in New Issue
Block a user