Skip to content

Commit

Permalink
feat(api-service): update email template API methods
Browse files Browse the repository at this point in the history
- Change listAllEmailTemplate to use GET method without data parameter
- Add new savedEmailTemplates method for fetching saved email templates
  • Loading branch information
0xdevcollins committed Nov 30, 2024
1 parent a40436f commit 9382265
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/api-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,11 @@ class ApiService {
}

//templates
async listAllEmailTemplate(data: TemplateTypes) {
return this.executeApiCall<any>("post", "/user/templates", data);
async listAllEmailTemplate() {
return this.executeApiCall<any>("get", "/user/templates");
}
async savedEmailTemplates() {
return this.executeApiCall<any>("get", "/user/email-templates");
}
async updateEmailTemplate(data: TemplateTypes) {
return this.executeApiCall<any>("put", "/auth/campaigns", data);
Expand Down

0 comments on commit 9382265

Please sign in to comment.