get image

This commit is contained in:
zjt
2024-05-25 22:21:50 +08:00
parent 7260601060
commit bcc9c30afc
2 changed files with 10 additions and 10 deletions

View File

@@ -42,16 +42,6 @@ const UpscaleHandler: RequestHandler<any ,any> = async (ctx) => {
if (type === "executed") {
console.log(data.output);
if (data.node === '47') {
const filePath = './data.json';
readJSONFile(filePath)
.then((data: any) => {
console.log('读取的JSON数据:', data);
// 修改对象
data.push({ prompt: prompt, url: baseUrl + '/view?filename=' + data.output.images[0].filename, like: 0,index: data.length })
// 保存回JSON文件
return saveJSONFile(filePath, data);
})
resolve(data.output.images[0].filename)
}