Skip to content

Commit 4e40bfd

Browse files
committed
Added actions
1 parent e74c189 commit 4e40bfd

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

components/sproutgigs/actions/post-job/post-job.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ export default {
7373
task_value: this.taskValue,
7474
},
7575
});
76+
77+
if (response.ok === false) {
78+
throw new Error(`Job creation failed: ${response.message}`);
79+
}
80+
7681
$.export("$summary", "Successfully sent the request. Result message: " + response.message);
7782
return response;
7883
},

components/sproutgigs/sproutgigs.app.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ export default {
3131
async options() {
3232
const response = await this.getCategories();
3333
return response.map(({
34-
id, category,
34+
id, subcategory,
3535
}) => ({
3636
value: id,
37-
label: category,
37+
label: subcategory,
3838
}));
3939
},
4040
},

0 commit comments

Comments
 (0)