feat: add ApiService implementations

This commit is contained in:
2024-06-05 21:45:21 +03:00
parent 5ff24d49b5
commit 3d9fabe217
8 changed files with 217 additions and 0 deletions

@ -0,0 +1,17 @@
import {Injectable} from "@angular/core";
import ApiService, {AvailableVersion} from "@api/api.service";
import {DisciplineResponse} from "@api/v1/disciplineResponse";
@Injectable()
export class DisciplineService extends ApiService {
protected basePath = 'Discipline/';
protected version = AvailableVersion.v1;
public getDisciplines(page: number | null = null, pageSize: number | null = null) {
return this.get<DisciplineResponse[]>('', {page: page, pageSize: pageSize});
}
public getById(id: number) {
return this.get<DisciplineResponse>(id.toString());
}
}