fix: change from localhost to the actual website
This commit is contained in:
1 parent
684b39c4fc
commit
cd5a41354b
1 file changed
+10
-7
@@ -60,13 +60,16 @@ const CreatePost = () => {
|
||||
if (form.prompt) {
|
||||
try {
|
||||
setGeneratingImg(true);
|
||||
const response = await fetch("http://localhost:8000/api/v1/dalle", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({ prompt: form.prompt }),
|
||||
});
|
||||
const response = await fetch(
|
||||
"https://dalle-image-generator-server.onrender.com/api/v1/dalle",
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({ prompt: form.prompt }),
|
||||
}
|
||||
);
|
||||
const data = await response.json();
|
||||
setForm({ ...form, photo: `data:image/jpeg;base64,${data.photo}` });
|
||||
} catch (error) {
|
||||
|
||||
Reference in new issue
Block a user