diff --git a/app/API/dashboard.py b/app/API/dashboard.py index 29a54e3..9bdb5af 100644 --- a/app/API/dashboard.py +++ b/app/API/dashboard.py @@ -31,8 +31,22 @@ def get_dashboard(register_id, register_r, s, diary_url, symbol): } index = requests.get(f'{diary_url}{symbol}/Start.mvc/Index', headers=headers, cookies=cookies) - permissionsValue = re.search("permissions: '(.)*'", index.text) - permissionsValue = permissionsValue.group() - print(permissionsValue) + permissions_value = re.search("permissions: '(.)*'", index.text) + permissions_value = permissions_value.group() + permissions_value = permissions_value.replace('permissions: ', '').replace("'", "") - return {"dupa": "dupa"} \ No newline at end of file + json = { + "permissions": permissions_value + } + + last_notes = requests.post(f'{diary_url}{symbol}/Start.mvc/GetLastNotes', headers=headers, cookies=cookies, json=json) + free_days = requests.post(f'{diary_url}{symbol}/Start.mvc/GetFreeDays', headers=headers, cookies=cookies, json=json) + lucky_number = requests.post(f'{diary_url}{symbol}/Start.mvc/GetKidsLuckyNumbers', headers=headers, cookies=cookies, json=json) + + return_data = { + "last_notes": last_notes.json(), + "free_days": free_days.json(), + "lucky_number": lucky_number.json() + } + + return return_data \ No newline at end of file diff --git a/templates/content.html b/templates/content.html index 7032fae..3df8965 100644 --- a/templates/content.html +++ b/templates/content.html @@ -42,9 +42,9 @@
- - John Doe - jdandturk@gmail.com + + Imie Imie2 Nazwisko + E-mail
  • dashboardStart
  • filter_6Oceny
  • @@ -55,7 +55,7 @@
  • emoji_eventsUwagi i Osiągnięcia
  • devicesDostęp Mobilny
  • businessSzkoła i Nauczyciele
  • -
  • emailWiadomości
  • +
  • emailWiadomości