23 lines
697 B
TypeScript
23 lines
697 B
TypeScript
import {Injectable} from "@angular/core";
|
|
import ApiService, {AvailableVersion} from "@api/api.service";
|
|
import {LectureHallResponse} from "@api/v1/lectureHallResponse";
|
|
import {LectureHallDetailsResponse} from "@api/v1/lectureHallDetailsResponse";
|
|
|
|
@Injectable()
|
|
export class LectureHallService extends ApiService {
|
|
protected basePath = 'LectureHall/';
|
|
protected version = AvailableVersion.v1;
|
|
|
|
public getLectureHalls() {
|
|
return this.get<LectureHallResponse[]>();
|
|
}
|
|
|
|
public getById(id: number) {
|
|
return this.get<LectureHallDetailsResponse>(id.toString());
|
|
}
|
|
|
|
public getByCampus(id: number) {
|
|
return this.get<LectureHallResponse[]>('GetByCampus/' + id.toString());
|
|
}
|
|
}
|