Last active
November 11, 2021 16:48
-
-
Save SidneyAllen/5a80814e477a04a3bb754ac149e9bee6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function () { | |
// update getSuggestions function | |
async function getSuggestions(val) { | |
const config = { | |
method: 'POST', | |
headers: new Headers({ | |
'Authorization': 'Basic ' + btoa(`${import.meta.env.VITE_LOB_API_KEY}:`), | |
'Content-Type': 'application/json' | |
}), | |
body: JSON.stringify({ | |
"address_prefix": import.meta.env.PROD ? val : '5 sugg' | |
}) | |
} | |
} | |
return { getSuggestions } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment