Code cleanup
This commit is contained in:
parent
86e418cca8
commit
490867d403
|
@ -77,17 +77,13 @@ function DreamTab(props: {
|
||||||
|
|
||||||
async function dream() {
|
async function dream() {
|
||||||
setIsDreaming(true)
|
setIsDreaming(true)
|
||||||
const url = `/api/v0/dream`
|
|
||||||
const data = {
|
const data = {
|
||||||
prompt: input + ', ' + MODIFIERS,
|
prompt: input + ', ' + MODIFIERS,
|
||||||
apiKey: API_KEY,
|
apiKey: API_KEY,
|
||||||
}
|
}
|
||||||
const headers = {
|
const response = await fetch(`/api/v0/dream`, {
|
||||||
'Content-Type': 'application/json',
|
|
||||||
}
|
|
||||||
const response = await fetch(url, {
|
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers,
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
})
|
})
|
||||||
const json = await response.json()
|
const json = await response.json()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user