openreplay/frontend/app/services/ConfigService.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

28 lines
691 B
TypeScript

import BaseService from './BaseService';
export interface WeeklyReport {
weeklyReport: boolean;
}
export default class ConfigService extends BaseService {
async fetchWeeklyReport(): Promise<WeeklyReport> {
return this.client
.get('/config/weekly_report')
.then((r) => r.json())
.then((j) => j.data);
}
async editWeeklyReport(config: WeeklyReport): Promise<WeeklyReport> {
return this.client
.post('/config/weekly_report', config)
.then((r) => r.json())
.then((j) => j.data);
}
async fetchGettingStarted(): Promise<any> {
return this.client
.get('/boarding')
.then((r) => r.json())
.then((j) => j.data);
}
}