Skip to content

Commit 2282def

Browse files
committed
fix(api): update form field names to work with serverless-api
1 parent 4a5fde9 commit 2282def

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: src/api/assets.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ Please change it to have "private" or "public" access.`);
143143
};
144144

145145
const form = new FormData();
146-
form.append('path', asset.path);
147-
form.append('visibility', asset.access);
148-
form.append('content', asset.content, contentOpts);
146+
form.append('Path', asset.path);
147+
form.append('Visibility', asset.access);
148+
form.append('Content', asset.content, contentOpts);
149149

150150
const resp = await client.post(
151151
`/Services/${serviceSid}/Assets/${asset.sid}/Versions`,

Diff for: src/api/functions.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ Please change it to have 'protected' access or deploy it as an asset.`);
140140
};
141141

142142
const form = new FormData();
143-
form.append('path', fn.path);
144-
form.append('visibility', fn.access);
145-
form.append('content', fn.content, contentOpts);
143+
form.append('Path', fn.path);
144+
form.append('Visibility', fn.access);
145+
form.append('Content', fn.content, contentOpts);
146146

147147
const resp = await client.post(
148148
`/Services/${serviceSid}/Functions/${fn.sid}/Versions`,

0 commit comments

Comments
 (0)