idek man ausbildungsnachweise fucking me up frfr ong

This commit is contained in:
csimonis 2024-11-12 08:01:28 +01:00
parent d510c92719
commit 1b1224cba0
16 changed files with 224 additions and 181 deletions

View file

@ -1,44 +1,15 @@
import {Injectable} from "@angular/core";
import {HttpClient} from "@angular/common/http";
import {inject, Injectable} from "@angular/core";
import {Observable} from "rxjs";
import {Hotel} from "../hotel/hotel";
@Injectable()
@Injectable({
providedIn: "root",
})
export class HotelService {
private hotels: Hotel[] = [
{
"hotelId": 1,
"hotelName": "Buea süßes Leben",
"description": "Schöne Aussicht am Meer",
"price": 230.5,
"imageUrl": "assets/img/heisenberg.jpg",
"rating": 3.5
},
{
"hotelId": 2,
"hotelName": "Marrakesch",
"description": "Genießen Sie den Blick auf die Berge",
"price": 145.5,
"imageUrl": "assets/img/kjan.png",
"rating": 5
},
{
"hotelId": 3,
"hotelName": "Abuja neuer Palast",
"description": "Kompletter Aufenthalt mit Autoservice",
"price": 120.12,
"imageUrl": "assets/img/huy.png",
"rating": 4
},
{
"hotelId": 4,
"hotelName": "OUR Hotel",
"description": "Wunderschönes Ambiente für Ihren Aufenthalt",
"price": 135.12,
"imageUrl": "assets/img/rat.png",
"rating": 2.5
}
];
private httpClient: HttpClient = inject(HttpClient);
public get getHotels() {
return this.hotels;
public getHotels(): Observable<Hotel[]> {
return this.httpClient.get<Hotel[]>('/api/hotels');
}
}