Skip to content

Commit

Permalink
Disabling type-check
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbyt3r committed Dec 6, 2023
1 parent 774b308 commit 7e97681
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"dev": "vite",
"build": "run-p type-check \"build-only {@}\" --",
"build": "run-p \"build-only {@}\" --",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
Expand Down
10 changes: 5 additions & 5 deletions scripts/load_eligible_attendees.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"X-Auth-Token": TUBER_APIKEY
}

attendees = uber_api.get_eligible_attendees()
#attendees = uber_api.get_eligible_attendees()

for attendee in attendees:
request = requests.post(
f'{TUBER_URL}/api/uber_login', json={"token": attendee})
print(f"{request.status_code}: {request.text.strip()}")
#for attendee in attendees:
# request = requests.post(
# f'{TUBER_URL}/api/uber_login', json={"token": attendee})
# print(f"{request.status_code}: {request.text.strip()}")

request = requests.post(
f"{TUBER_URL}/api/uber_department_sync", headers=headers)
Expand Down
21 changes: 21 additions & 0 deletions scripts/uber_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,24 @@ def get_nights():
newdate = newdate.strftime("%Y-%m-%d")
lookup[newdate] = str(result['order'][idx])
return lookup

def get_departments():
req = {
"method": "dept.list"
}
return requests.post(UBER_URL, headers=headers, json=req).json()['result']

def get_shifts():
departments = get_departments()
shifts = {}
for dept_id, dept_name in departments.items():
print(f"Loading shifts from {dept_name}")
req = {
"method": "shifts.lookup",
"params": {
"department_id": dept_id
}
}
shifts[dept_id] = requests.post(UBER_URL, headers=headers, json=req).json()['result']
print(f" Got {len(shifts[dept_id])} shifts")
return shifts

0 comments on commit 7e97681

Please sign in to comment.