Updated API path
This commit is contained in:
parent
ce4694830d
commit
cadccf1a53
@ -2,7 +2,6 @@ import requests
|
|||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
SERVER = 'http://127.0.0.1:5000/'
|
SERVER = 'http://127.0.0.1:5000/'
|
||||||
FETCH_PATH = 'api/fetch/'
|
|
||||||
|
|
||||||
INSTRUCTIONS = [
|
INSTRUCTIONS = [
|
||||||
'---- Instructions ----',
|
'---- Instructions ----',
|
||||||
@ -83,7 +82,7 @@ def validate_answer(answers:list, question:dict) -> bool:
|
|||||||
def render_questions() -> dict:
|
def render_questions() -> dict:
|
||||||
answers = []
|
answers = []
|
||||||
try:
|
try:
|
||||||
questions = requests.get(url=f'{SERVER}{FETCH_PATH}questions/').json()
|
questions = requests.get(url=f'{SERVER}/api/questions/').json()
|
||||||
except Exception as exception:
|
except Exception as exception:
|
||||||
print(exception)
|
print(exception)
|
||||||
quit()
|
quit()
|
||||||
|
Loading…
Reference in New Issue
Block a user