Code cleanup

This commit is contained in:
Austin Chen 2022-10-12 09:48:58 -07:00
parent 86e418cca8
commit 490867d403

View File

@ -77,17 +77,13 @@ function DreamTab(props: {
async function dream() {
setIsDreaming(true)
const url = `/api/v0/dream`
const data = {
prompt: input + ', ' + MODIFIERS,
apiKey: API_KEY,
}
const headers = {
'Content-Type': 'application/json',
}
const response = await fetch(url, {
const response = await fetch(`/api/v0/dream`, {
method: 'POST',
headers,
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(data),
})
const json = await response.json()