fix formatting

This commit is contained in:
LenAnderson
2023-11-20 12:40:27 +00:00
parent 06ececc1a5
commit 777d105602

View File

@@ -431,7 +431,7 @@ function registerEndpoints(app, jsonParser) {
} }
}); });
app.post('/api/sd/comfy/vaes', jsonParser, async(request, response)=>{ app.post('/api/sd/comfy/vaes', jsonParser, async (request, response) => {
try { try {
const url = new URL(request.body.url); const url = new URL(request.body.url);
url.pathname = '/object_info' url.pathname = '/object_info'
@@ -449,7 +449,7 @@ function registerEndpoints(app, jsonParser) {
} }
}); });
app.post('/api/sd/comfy/workflows', jsonParser, async(request, response) => { app.post('/api/sd/comfy/workflows', jsonParser, async (request, response) => {
try { try {
const data = getComfyWorkflows(); const data = getComfyWorkflows();
return response.send(data); return response.send(data);
@@ -459,7 +459,7 @@ function registerEndpoints(app, jsonParser) {
} }
}); });
app.post('/api/sd/comfy/workflow', jsonParser, async(request, response)=>{ app.post('/api/sd/comfy/workflow', jsonParser, async (request, response) => {
try { try {
let path = `public/user/workflows/${sanitize(String(request.body.file_name))}`; let path = `public/user/workflows/${sanitize(String(request.body.file_name))}`;
if (!fs.existsSync(path)) { if (!fs.existsSync(path)) {
@@ -476,7 +476,7 @@ function registerEndpoints(app, jsonParser) {
} }
}); });
app.post('/api/sd/comfy/saveWorkflow', jsonParser, async(request, response)=>{ app.post('/api/sd/comfy/saveWorkflow', jsonParser, async (request, response) => {
try { try {
if (!fs.existsSync('public/user/workflows')) { if (!fs.existsSync('public/user/workflows')) {
fs.mkdirSync('public/user/workflows'); fs.mkdirSync('public/user/workflows');
@@ -494,7 +494,7 @@ function registerEndpoints(app, jsonParser) {
} }
}); });
app.post('/api/sd/comfy/deleteWorkflow', jsonParser, async(request, response)=>{ app.post('/api/sd/comfy/deleteWorkflow', jsonParser, async (request, response) => {
try { try {
let path = `public/user/workflows/${sanitize(String(request.body.file_name))}`; let path = `public/user/workflows/${sanitize(String(request.body.file_name))}`;
if (fs.existsSync(path)) { if (fs.existsSync(path)) {
@@ -507,7 +507,7 @@ function registerEndpoints(app, jsonParser) {
} }
}); });
app.post('/api/sd/comfy/workflows', jsonParser, async (request, response)=>{ app.post('/api/sd/comfy/workflows', jsonParser, async (request, response) => {
try { try {
const data = getComfyWorkflows(); const data = getComfyWorkflows();
return response.send(data); return response.send(data);
@@ -517,7 +517,7 @@ function registerEndpoints(app, jsonParser) {
} }
}); });
app.post('/api/sd/comfy/workflow', jsonParser, async(request, response)=>{ app.post('/api/sd/comfy/workflow', jsonParser, async (request, response) => {
try { try {
let path = `public/user/workflows/${sanitize(String(request.body.file_name))}`; let path = `public/user/workflows/${sanitize(String(request.body.file_name))}`;
if (!fs.existsSync(path)) { if (!fs.existsSync(path)) {
@@ -534,7 +534,7 @@ function registerEndpoints(app, jsonParser) {
} }
}); });
app.post('/api/sd/comfy/saveWorkflow', jsonParser, async(request, response)=>{ app.post('/api/sd/comfy/saveWorkflow', jsonParser, async (request, response) => {
try { try {
if (!fs.existsSync('public/user/workflows')) { if (!fs.existsSync('public/user/workflows')) {
fs.mkdirSync('public/user/workflows'); fs.mkdirSync('public/user/workflows');
@@ -552,7 +552,7 @@ function registerEndpoints(app, jsonParser) {
} }
}); });
app.post('/api/sd/comfy/deleteWorkflow', jsonParser, async(request, response)=>{ app.post('/api/sd/comfy/deleteWorkflow', jsonParser, async (request, response) => {
try { try {
let path = `public/user/workflows/${sanitize(String(request.body.file_name))}`; let path = `public/user/workflows/${sanitize(String(request.body.file_name))}`;
if (fs.existsSync(path)) { if (fs.existsSync(path)) {