feat: add ApiService implementations
This commit is contained in:
17
src/api/v1/discipline.service.ts
Normal file
17
src/api/v1/discipline.service.ts
Normal file
@ -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());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user