Change url, add group_id
This commit is contained in:
parent
061959e2ac
commit
b14ed2fb5a
|
|
@ -1,6 +1,6 @@
|
||||||
import * as axios from 'axios'
|
import * as axios from 'axios'
|
||||||
|
|
||||||
const hepBaseUrl = 'https://www.hep-verlag.ch';
|
const hepBaseUrl = 'https://stage.hep-verlag.ch';
|
||||||
|
|
||||||
export function register(registrationData) {
|
export function register(registrationData) {
|
||||||
return axios.post('/api/proxy/registration/', registrationData);
|
return axios.post('/api/proxy/registration/', registrationData);
|
||||||
|
|
@ -11,7 +11,7 @@ export function login(username, password) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function emailExists(email) {
|
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,
|
customerEmail: email,
|
||||||
websiteId: 1
|
websiteId: 1
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ class RegistrationProxyView(View):
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
hep_client = HepClient()
|
hep_client = HepClient()
|
||||||
data = json.loads(request.body)
|
data = json.loads(request.body)
|
||||||
|
data['group_id'] = 5
|
||||||
|
|
||||||
try:
|
try:
|
||||||
hep_data = hep_client.customer_create(data)
|
hep_data = hep_client.customer_create(data)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue