This commit is contained in:
Christian Cueni 2021-06-17 10:32:15 +02:00
parent 25b60d1c5a
commit f1ca00f47b
3 changed files with 1 additions and 51 deletions

View File

@ -80,7 +80,6 @@ const routes = [
{
path: '/login-success',
redirect: to => {
console.log(to);
switch (to.query.state) {
case 'email_not_verified':
return '/verify-email';

View File

@ -65,56 +65,6 @@ class HepClient:
response = self._call('api/partners/users/orders/search', request, token, data=data)
return response.json()['data']
# return [
# {
# "id": 5,
# "status": "paid",
# "order_total": 10000,
# "created_at": "2021-05-10T20:52:16.000000Z",
# "billing_address": {
# "id": 20,
# "salutation": "male",
# "first_name": "Hans",
# "last_name": "Meier",
# "company": "Lustig GmbH",
# "street": "Sulgenrain 12890",
# "city": "Bern",
# "post_code": "3007",
# "country": "Schweiz"
# },
# "delivery_address": {
# "id": 19,
# "salutation": "male",
# "first_name": "Hans",
# "last_name": "Muster",
# "company": "Muster AG",
# "street": "Ruderweg 24",
# "city": "Bern",
# "post_code": "3000",
# "country": "Schweiz"
# },
# "entries": [
# {
# "id": 3433,
# "uri": "\/products\/myskillbox-lernende",
# "url": None,
# "title": "mySkillbox für Lernende ",
# "subtitle": "Lizenz gültig für 4 Jahre",
# "isbn": "978-3-0355-1397-4",
# "slug": "myskillbox-lernende",
# "product_type": "eLehrmittel",
# "product_form": "",
# "cover": "https:\/\/hep-verlag.fra1.digitaloceanspaces.com\/staging\/products\/2921\/978-3-0355-1397-4.jpg",
# "price": 100,
# "price_total": 100,
# "amount": 1,
# "authors": []
# }
# ]
# }
# ]
def active_myskillbox_product_for_customer(self, request=None, token=None):
eorders = self.fetch_eorders(request=request, token=token)
myskillbox_products = self._extract_myskillbox_products(eorders)

View File

@ -4,6 +4,7 @@ from django.conf import settings
from oauth.models import OAuth2Token
# https://docs.authlib.org/en/latest/client/frameworks.html#frameworks-clients
def fetch_token(name, request):
try:
token = OAuth2Token.objects.get(