refactor(SW-302): code cleanup

This commit is contained in:
Matilda Landström
2024-09-19 13:26:05 +02:00
parent 2438d04f43
commit 72c961eabf
9 changed files with 65 additions and 37 deletions

View File

@@ -26,7 +26,6 @@ import {
getRatesInputSchema,
} from "./input"
import {
Facility,
getAvailabilitySchema,
getHotelDataSchema,
getRatesSchema,
@@ -44,6 +43,7 @@ import {
import { FacilityEnum } from "@/types/components/hotelPage/facilities"
import { AvailabilityEnum } from "@/types/components/hotelReservation/selectHotel/selectHotel"
import type { RequestOptionsWithOutBody } from "@/types/fetch"
import type { Facility } from "@/types/hotel"
import type { GetHotelPageData } from "@/types/trpc/routers/contentstack/hotelPage"
const meter = metrics.getMeter("trpc.hotels")
@@ -213,7 +213,7 @@ export const hotelQueryRouter = router({
? contentstackData?.content[0]
: null
const facilities: Array<Facility> = [
const facilities: Facility[] = [
{
...apiJson.data.attributes.restaurantImages,
id: FacilityEnum.restaurant,