Skip to content

Commit 1d35b09

Browse files
lint fixes
1 parent b5f7dce commit 1d35b09

File tree

4 files changed

+19
-14
lines changed

4 files changed

+19
-14
lines changed

components/leonardo_ai/actions/generate-image/generate-image.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export default {
9595
modelId,
9696
guidance_scale: guidanceScale,
9797
num_inference_steps: numInferenceSteps,
98-
seed: seed
98+
seed,
9999
};
100100

101101
const response = await this.app._makeRequest({
@@ -105,7 +105,7 @@ export default {
105105
data,
106106
});
107107

108-
$.export("$summary", `Successfully generated ${numImages} image(s)`);
108+
$.export("$summary", `Successfully generated ${numImages} image(s)`);
109109
return response;
110110
},
111111
};

components/leonardo_ai/actions/generate-motion/generate-motion.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default {
5252
motionStrength,
5353
isPublic,
5454
isInitImage,
55-
isVariation,
55+
isVariation,
5656
};
5757

5858
const response = await this.app._makeRequest({

components/leonardo_ai/actions/upload-image/upload-image.mjs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,20 @@ export default {
6464

6565
const { uploadInitImage } = uploadResponse;
6666
const fields = JSON.parse(uploadInitImage.fields);
67-
const formData = new FormData();
67+
const formData = new FormData();
6868

69-
//Important: Order of fields is sanctioned by Leonardo AI API. Fields should go first, then the file
70-
for (const [label, value] of Object.entries(fields)) {
69+
//Important: Order of fields is sanctioned by Leonardo AI API. Fields go first, then the file
70+
for (const [
71+
label,
72+
value,
73+
] of Object.entries(fields)) {
7174
formData.append(label, value.toString());
72-
}
75+
}
7376
formData.append("file", stream, {
7477
contentType: metadata.contentType,
7578
knownLength: metadata.size,
7679
filename: metadata.name,
77-
});
80+
});
7881
const uploadUrl = uploadInitImage.url;
7982

8083
// Step 2: Upload the file to the presigned URL

components/leonardo_ai/leonardo_ai.app.mjs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { axios } from "@pipedream/platform";
2-
import FormData from "form-data";
32

43
export default {
54
type: "app",
@@ -17,13 +16,16 @@ export default {
1716
};
1817
},
1918
async _makeRequest({
20-
$ = this,
21-
method = "GET",
22-
path,
23-
data,
19+
$ = this,
20+
method = "GET",
21+
path,
22+
data,
2423
...opts
2524
}) {
26-
const { headers: userHeaders, ...rest } = opts;
25+
const {
26+
headers: userHeaders,
27+
...rest
28+
} = opts;
2729
const config = {
2830
method,
2931
...rest,

0 commit comments

Comments
 (0)