refactor: implement RequestBuilder for main request
This commit is contained in:
@ -4,11 +4,14 @@ import {DisciplineResponse} from "@api/v1/disciplineResponse";
|
||||
|
||||
@Injectable()
|
||||
export class DisciplineService extends ApiService {
|
||||
protected basePath = 'Discipline/';
|
||||
protected version = AvailableVersion.v1;
|
||||
public readonly basePath = 'Discipline/';
|
||||
public readonly version = AvailableVersion.v1;
|
||||
|
||||
public getDisciplines(page: number | null = null, pageSize: number | null = null) {
|
||||
return this.get<DisciplineResponse[]>('', {page: page, pageSize: pageSize});
|
||||
return this.createRequestBuilder()
|
||||
.setQueryParams({page: page, pageSize: pageSize})
|
||||
.build<ApiService>()
|
||||
.get<DisciplineResponse[]>();
|
||||
}
|
||||
|
||||
public getById(id: number) {
|
||||
|
Reference in New Issue
Block a user