22 lines
645 B
TypeScript
22 lines
645 B
TypeScript
import { client } from "@/shared/api";
|
|
import {
|
|
type UserStatisticsService,
|
|
type ConnectionStatisticsParams,
|
|
type ConnectionStatistics,
|
|
} from "../model/user-statistics-interface";
|
|
import { ENDPOINT } from "@/shared/config";
|
|
|
|
class UserStatisticsApiService implements UserStatisticsService {
|
|
async getConnectionStatistics(
|
|
params: ConnectionStatisticsParams,
|
|
): Promise<ConnectionStatistics> {
|
|
const response = await client.get<ConnectionStatistics>(
|
|
`${ENDPOINT.CMS_SERVICE.CONNECTION_LOG}/stat`,
|
|
{ params },
|
|
);
|
|
return response.data;
|
|
}
|
|
}
|
|
|
|
export const UserStatisticsApi = new UserStatisticsApiService();
|