refactor: Replace 'reach' field with 'public' boolean in service registration and related components
This commit is contained in:
@@ -11,7 +11,7 @@ export interface RegisteredService {
|
||||
type: string;
|
||||
health?: string;
|
||||
};
|
||||
reach: string;
|
||||
public: boolean;
|
||||
tls?: string;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export const servicesApi = {
|
||||
async list(): Promise<{ services: RegisteredService[] }> {
|
||||
return apiClient.get('/api/v1/services');
|
||||
},
|
||||
async register(svc: { domain: string; backend: { address: string; type: string; health?: string }; reach: string; subdomains?: boolean; source?: string }): Promise<{ message: string; service: RegisteredService }> {
|
||||
async register(svc: { domain: string; backend: { address: string; type: string; health?: string }; public?: boolean; subdomains?: boolean; source?: string }): Promise<{ message: string; service: RegisteredService }> {
|
||||
return apiClient.post('/api/v1/services', svc);
|
||||
},
|
||||
async deregister(domain: string): Promise<{ message: string }> {
|
||||
@@ -225,12 +225,6 @@ export interface CrowdSecStatus {
|
||||
bouncers: CrowdSecBouncer[];
|
||||
}
|
||||
|
||||
export interface CrowdSecProvisionResult {
|
||||
message: string;
|
||||
centralLapiUrl: string;
|
||||
agentUsername: string;
|
||||
}
|
||||
|
||||
export const crowdSecApi = {
|
||||
async getStatus(): Promise<CrowdSecStatus> {
|
||||
return apiClient.get('/api/v1/crowdsec/status');
|
||||
@@ -275,10 +269,6 @@ export const crowdSecApi = {
|
||||
async deleteDecisionByIP(ip: string): Promise<{ message: string }> {
|
||||
return apiClient.delete(`/api/v1/crowdsec/decisions/ip/${encodeURIComponent(ip)}`);
|
||||
},
|
||||
|
||||
async provision(instanceName: string): Promise<CrowdSecProvisionResult> {
|
||||
return apiClient.post(`/api/v1/crowdsec/provision/${encodeURIComponent(instanceName)}`);
|
||||
},
|
||||
};
|
||||
|
||||
// Global Secrets
|
||||
|
||||
Reference in New Issue
Block a user