mirror of
https://github.com/UofCBaja/Interview-Backend.git
synced 2025-06-15 13:24:19 -06:00
feat(Packagers): added html body components
This commit is contained in:
parent
01c05dfb78
commit
ca4d2e5796
11
GetSchedulePackager.py
Normal file
11
GetSchedulePackager.py
Normal file
@ -0,0 +1,11 @@
|
||||
import yaml
|
||||
import json
|
||||
|
||||
with open("./MockDB/schedule.yaml", "r") as scheduleyml:
|
||||
ymlschedule = yaml.safe_load(scheduleyml)
|
||||
|
||||
def getSchedulePackager():
|
||||
res = {"isBase64ENcoded": "false",
|
||||
"statusCode": 200,
|
||||
"body": ymlschedule}
|
||||
return res
|
11
MockDB/schedule.yaml
Normal file
11
MockDB/schedule.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
Date:
|
||||
Sept 16:
|
||||
Meeting Duration: 30 min
|
||||
Meeting Start Times:
|
||||
- 10:00 am
|
||||
- 10:30 am
|
||||
- 11:00 am
|
||||
- 11:30 am
|
||||
- 1:00 pm
|
||||
- 1:30 pm
|
||||
- 2:00 pm
|
BIN
__pycache__/GetSchedulePackager.cpython-313.pyc
Normal file
BIN
__pycache__/GetSchedulePackager.cpython-313.pyc
Normal file
Binary file not shown.
BIN
__pycache__/postSelectAppointment.cpython-313.pyc
Normal file
BIN
__pycache__/postSelectAppointment.cpython-313.pyc
Normal file
Binary file not shown.
8
main.py
8
main.py
@ -1,2 +1,8 @@
|
||||
from GetSchedulePackager import getSchedulePackager
|
||||
from postSelectAppointment import SelectAppointment
|
||||
import json
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("hello")
|
||||
print("hello")
|
||||
print(json.dumps(getSchedulePackager(), indent=4))
|
||||
print(json.dumps(SelectAppointment("10:00 am"), indent=4))
|
17
postSelectAppointment.py
Normal file
17
postSelectAppointment.py
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
def SelectAppointment (appointmentTime):
|
||||
status = mockWriteFunction(appointmentTime)
|
||||
res = {"isBase64ENcoded": "false",
|
||||
"statusCode": 200,
|
||||
"body": ""}
|
||||
if status:
|
||||
res["body"] = {"Success": True}
|
||||
else:
|
||||
res["body"] = {"Success": False}
|
||||
return res
|
||||
|
||||
|
||||
|
||||
def mockWriteFunction(appTime):
|
||||
return 0
|
Loading…
x
Reference in New Issue
Block a user