Skip to content

Commit

Permalink
fix(back-end): fix hotel offer helper args type
Browse files Browse the repository at this point in the history
  • Loading branch information
weronikaolejniczak committed May 17, 2024
1 parent 1039daa commit 0e69c0c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apps/back-end/src/helpers/getHotelOffer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
const getHotelOffer = (offers) => {
if (Array.isArray(offers) && offers.length > 0) {
interface IHotelOffer {
guests: string;
price: string;
}

const getHotelOffer = (offers: IHotelOffer[]) => {
if (Array.isArray(offers) && offers.length > 0 && offers[0]) {
const guests = offers[0].guests;
const price = offers[0].price;

Expand Down

0 comments on commit 0e69c0c

Please sign in to comment.