diff --git a/src/app/hotel-details/hotel-details.component.html b/src/app/hotel-details/hotel-details.component.html
index 9185215..4ceeab2 100644
--- a/src/app/hotel-details/hotel-details.component.html
+++ b/src/app/hotel-details/hotel-details.component.html
@@ -1,4 +1,5 @@
@if (hotel != null) {
+
}
diff --git a/src/app/hotel-details/hotel-details.component.ts b/src/app/hotel-details/hotel-details.component.ts
index 2227551..5adc141 100644
--- a/src/app/hotel-details/hotel-details.component.ts
+++ b/src/app/hotel-details/hotel-details.component.ts
@@ -20,6 +20,13 @@ export class HotelDetailsComponent implements OnInit {
constructor(private route: ActivatedRoute, private http: HttpClient, private router: Router) { }
+ delete(): void {
+ if (confirm("Are u sure u want to delete this hotel")) {
+ this.http.delete("/api/hotels/" + this.route.snapshot.paramMap.get("id")).subscribe();
+ this.router.navigate(["/"]);
+ }
+ }
+
ngOnInit(): void {
const routeParams = this.route.snapshot.paramMap;
const hotelId = routeParams.get("id");