Code cleanup
This commit is contained in:
parent
86e418cca8
commit
490867d403
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user