Updated API path

This commit is contained in:
Vivek Santayana 2022-08-31 00:49:00 +01:00
parent ce4694830d
commit cadccf1a53

View File

@ -2,7 +2,6 @@ import requests
from typing import Union
SERVER = 'http://127.0.0.1:5000/'
FETCH_PATH = 'api/fetch/'
INSTRUCTIONS = [
'---- Instructions ----',
@ -83,7 +82,7 @@ def validate_answer(answers:list, question:dict) -> bool:
def render_questions() -> dict:
answers = []
try:
questions = requests.get(url=f'{SERVER}{FETCH_PATH}questions/').json()
questions = requests.get(url=f'{SERVER}/api/questions/').json()
except Exception as exception:
print(exception)
quit()