misc.generate: forgot to set POST

This commit is contained in:
Cynthia Foxwell 2022-07-04 19:21:26 -06:00
parent a3a693a727
commit b15bcfbdf3

View file

@ -406,11 +406,13 @@ generate.callback = async function (msg, line) {
if (!line || line.length === 0) return "Arguments required."; if (!line || line.length === 0) return "Arguments required.";
let request = await fetch("https://backend.craiyon.com/generate", { let request = await fetch("https://backend.craiyon.com/generate", {
method: "POST",
headers: GENERATE_HEADERS, headers: GENERATE_HEADERS,
body: JSON.stringify({prompt: line}), body: JSON.stringify({prompt: line}),
}); });
while (request.status !== 200) { while (request.status !== 200) {
request = await fetch("https://backend.craiyon.com/generate", { request = await fetch("https://backend.craiyon.com/generate", {
method: "POST",
headers: GENERATE_HEADERS, headers: GENERATE_HEADERS,
body: JSON.stringify({prompt: line}), body: JSON.stringify({prompt: line}),
}); });