chore: Config IMAP dans le Front

This commit is contained in:
N3WT DE COMPET
2025-05-27 20:01:00 +02:00
parent 39d6a8e909
commit 98bb6f50a8
4 changed files with 47 additions and 22 deletions

View File

@ -1,4 +1,4 @@
import { BE_SETTINGS_SMTP_URL } from '@/utils/Url';
import { BE_SETTINGS_MAIL_URL } from '@/utils/Url';
import { errorHandler, requestResponseHandler } from './actionsHandlers';
export const PENDING = 'pending';
@ -6,7 +6,7 @@ export const SUBSCRIBED = 'subscribed';
export const ARCHIVED = 'archived';
export const fetchSmtpSettings = (csrfToken, establishment_id = null) => {
let url = `${BE_SETTINGS_SMTP_URL}/`;
let url = `${BE_SETTINGS_MAIL_URL}/`;
if (establishment_id) {
url += `?establishment_id=${establishment_id}`;
}
@ -21,7 +21,7 @@ export const fetchSmtpSettings = (csrfToken, establishment_id = null) => {
};
export const editSmtpSettings = (data, csrfToken) => {
return fetch(`${BE_SETTINGS_SMTP_URL}/`, {
return fetch(`${BE_SETTINGS_MAIL_URL}/`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',