feat(backend): Added newsletter subscriptions
This commit is contained in:
parent
9460d98f6a
commit
2210f26e03
176 changed files with 1728 additions and 629 deletions
|
@ -302,10 +302,17 @@ Backend.prototype.sendLanguageSuggestion = async function (data) {
|
|||
}
|
||||
|
||||
/*
|
||||
* Create payment intent
|
||||
* Confirm newsletter subscribe
|
||||
*/
|
||||
Backend.prototype.createPaymentIntent = async function (data) {
|
||||
return responseHandler(await api.post(`/payments/intent`, data), 201)
|
||||
Backend.prototype.confirmNewsletterSubscribe = async function ({ id, ehash }) {
|
||||
return responseHandler(await api.put('/subscriber', { id, ehash }))
|
||||
}
|
||||
|
||||
/*
|
||||
* Confirm newsletter unsubscribe
|
||||
*/
|
||||
Backend.prototype.confirmNewsletterUnsubscribe = async function ({ id, ehash }) {
|
||||
return responseHandler(await api.delete('/subscriber', { id, ehash }))
|
||||
}
|
||||
|
||||
export function useBackend(token = false) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue