Skip to content

Commit 01e8891

Browse files
committed
Done requested changes
1 parent 572de72 commit 01e8891

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

components/goodbits/actions/create-subscriber/create-subscriber.mjs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ export default {
3131
const response = await this.app.createSubscriber({
3232
$,
3333
data: {
34-
email: this.email,
35-
first_name: this.firstName,
36-
last_name: this.lastName,
34+
subscriber: {
35+
email: this.email,
36+
first_name: this.firstName,
37+
last_name: this.lastName,
38+
},
3739
},
3840
});
39-
$.export("$summary", "Successfully created new subscriber named");
41+
$.export("$summary", "Successfully created new subscriber");
4042
return response;
4143
},
4244
};

components/goodbits/actions/update-subscriber-status/update-subscriber-status.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ export default {
2222
},
2323
},
2424
async run({ $ }) {
25-
const response = await this.app.unsubscribeSubscriber({
25+
const response = await this.app.updateSubscriberStatus({
2626
$,
2727
email: this.email,
2828
data: {
29-
status: this.status,
29+
subscriber: {
30+
status: this.status,
31+
},
3032
},
3133
});
3234
$.export("$summary", "Successfully uptated subscriber status");

components/goodbits/goodbits.app.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default {
5252
optional: true,
5353
},
5454
imageCandidates: {
55-
type: "string",
55+
type: "string[]",
5656
label: "Image Candidates",
5757
description: "List of candidate image URLs",
5858
optional: true,
@@ -85,7 +85,7 @@ export default {
8585
...args,
8686
});
8787
},
88-
async unsubscribeSubscriber({
88+
async updateSubscriberStatus({
8989
email, ...args
9090
}) {
9191
return this._makeRequest({

0 commit comments

Comments
 (0)