[WEB-4479] feat: enable/disable SMTP configuration (#7393)
* feat: api update instance configuration * chore: add enable_smtp key * fix: empty string for enable_smtp key * chore: update email_port and email_from * fix: handled smtp enable disable * fix: error handling * fix: refactor * fix: removed enabled toast * fix: refactor --------- Co-authored-by: gakshita <akshitagoyal1516@gmail.com> Co-authored-by: Akshita Goyal <36129505+gakshita@users.noreply.github.com>
This commit is contained in:
parent
da5390fa03
commit
99127ff8e4
9 changed files with 155 additions and 24 deletions
|
|
@ -122,4 +122,17 @@ export class InstanceService extends APIService {
|
|||
throw error?.response?.data;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables the email configuration
|
||||
* @returns {Promise<void>} Promise resolving to void
|
||||
* @throws {Error} If the API request fails
|
||||
*/
|
||||
async disableEmail(): Promise<void> {
|
||||
return this.delete("/api/instances/configurations/disable-email-feature/")
|
||||
.then((response) => response?.data)
|
||||
.catch((error) => {
|
||||
throw error?.response?.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue