summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/forms/subscription.actions.js
blob: bf7a30eb7ed6d045cb142084f7551f8848c68333 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const SUBSCRIBE_URL = "https://editor.e-flux-systems.com/subscribe"

export const subscribe = email => {
  const data = new FormData()
  data.add('email', email)
  data.add('lists[]', 'eflux')
  return fetch(SUBSCRIBE_URL, {
    method: 'POST',
    body: data,
  })
  .then(res => res.json())
  .then(res => {
    return res
  })
  .catch(err => {
    return err
  })
}