Change url, add group_id

This commit is contained in:
Christian Cueni 2020-04-27 08:14:39 +02:00
parent 061959e2ac
commit b14ed2fb5a
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import * as axios from 'axios'
const hepBaseUrl = 'https://www.hep-verlag.ch';
const hepBaseUrl = 'https://stage.hep-verlag.ch';
export function register(registrationData) {
return axios.post('/api/proxy/registration/', registrationData);
@ -11,7 +11,7 @@ export function login(username, password) {
}
export function emailExists(email) {
return axios.post(`https://www.hep-verlag.ch/rest/deutsch/V1/customers/isEmailAvailable`, {
return axios.post(`${hepBaseUrl}/rest/deutsch/V1/customers/isEmailAvailable`, {
customerEmail: email,
websiteId: 1
});

View File

@ -20,6 +20,7 @@ class RegistrationProxyView(View):
def post(self, request, *args, **kwargs):
hep_client = HepClient()
data = json.loads(request.body)
data['group_id'] = 5
try:
hep_data = hep_client.customer_create(data)