apna-college / wanderlust

95 stars 92 forks source link

Issue in Init/data.js file. #9

Open Abhinandan-Sah opened 6 months ago

Abhinandan-Sah commented 6 months ago

The image is of object type instead of String type which is creating error. I have create pull request you can refer that in case you are having problem.

Uwais-shah commented 2 months ago

hey you got the solution?

Abhinandan-Sah commented 2 months ago

yep I have the solution, The problem was the image data is in object form just do image.url instead of image

Uwais-shah commented 2 months ago

okay bro, thanks

Kanakuppi commented 2 weeks ago

Also you can define schema of image as follow and you it as usual image:{ filename: { type: String, default: 'listing image' }, url: { type: String, default:"https://www.istockphoto.com/photo/exterior-of-modern-home-gm169821670-26945756?utm_campaign=srp_photos_top&utm_content=https%3A%2F%2Funsplash.com%2Fs%2Fphotos%2Fhome-design-from-outside%3Flicense%3Dfree&utm_medium=affiliate&utm_source=unsplash&utm_term=home+design+from+outside%3A%3Areduced-affiliates%3Aquarter", set: (v) => v === ""?"https://www.istockphoto.com/photo/exterior-of-modern-home-gm169821670-26945756?utm_campaign=srp_photos_top&utm_content=https%3A%2F%2Funsplash.com%2Fs%2Fphotos%2Fhome-design-from-outside%3Flicense%3Dfree&utm_medium=affiliate&utm_source=unsplash&utm_term=home+design+from+outside%3A%3Areduced-affiliates%3Aquarter":v, } }