platform
platform copied to clipboard
chore: convert text to venue
As a Developer I need a function getVenueFromText(input): Venue so that I can implement #143 and #101
It should return existing venue from venues collection (find by place_id) or add new one.
Examples of input:
- "Marienplatz"
- "Marienplatz, Munich"
console.log(getVenueFromText('Marienplatz'))
should output this object:
Return:
{
name: suggestion.name,
id: suggestion.place_id,
rooms: '',
map: '',
address: suggestion.value,
createdAt: Date.now(),
}
Closes #158
Demo: https://wedance-amanuela97.netlify.app/demo/venueFromText/