openreplay/frontend/app/services/AuditService.ts
Andrey Babushkin fd5c0c9747
Add lokalisation (#3092)
* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales
2025-03-06 17:43:15 +01:00

27 lines
641 B
TypeScript

import APIClient from 'App/api_client';
export default class AuditService {
private client: APIClient;
constructor(client?: APIClient) {
this.client = client || new APIClient();
}
initClient(client?: APIClient) {
this.client = client || new APIClient();
}
all(data: any): Promise<any> {
return this.client
.post('/trails', data)
.then((response) => response.json())
.then((response) => response.data || []);
}
one(id: string): Promise<any> {
return this.client
.get(`/trails/${id}`)
.then((response) => response.json())
.then((response) => response.data || {});
}
}