Email subscription params in request body
This commit is contained in:
@@ -73,13 +73,13 @@ export const uploadImage = (image: File): Promise<Image> => {
|
||||
* @param emailAddress email for subscription
|
||||
*/
|
||||
export const emailVerificationForSubscribe = (emailAddress: string) =>
|
||||
apiFetcher.post('/email/subscribe', { address: emailAddress });
|
||||
apiFetcher.post('/email/subscribe', {}, { address: emailAddress });
|
||||
|
||||
/**
|
||||
* Confirmation of email subscription to updates
|
||||
* @param token confirmation token from email
|
||||
*/
|
||||
export const emailConfirmationForSubscribe = (token: string) => apiFetcher.post('/email/confirm', { tkn: token });
|
||||
export const emailConfirmationForSubscribe = (token: string) => apiFetcher.post('/email/confirm', {}, { token });
|
||||
|
||||
/**
|
||||
* Decline current subscription to updates
|
||||
|
||||
@@ -59,7 +59,7 @@ const createFetcher = (baseUrl: string = ''): Methods => {
|
||||
params.body = body;
|
||||
} else if (typeof body === 'object' && body !== null) {
|
||||
headers['Content-Type'] = 'application/json';
|
||||
params.body = JSON.stringify(body);
|
||||
params.body = JSON.stringify({ ...body, site: siteId });
|
||||
} else {
|
||||
params.body = body;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user