MireaFrontend/src/api/v1/lectureHall.service.ts

23 lines
697 B
TypeScript
Raw Normal View History

2024-06-05 21:45:21 +03:00
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());
}
}