generated from mwc/project_banjo_app
Finished Banjo App
I am proud of my project. I actually just went back in and reorganized the endpoints and added a new one named "course". I did this becuase I will be teaching more than one course in the future and I want to be able to easily add whatever courses I teach to the app. I also reorganized the endpoints so that they are in a more logical order starting with the broadest category (course) and then going to the more specific categories as you go down the list. I definitely learned a lot of new skills skills along the way and I am excited to keep building on this project in the future.
This commit is contained in:
@@ -39,9 +39,10 @@ lessons_data = [
|
||||
}
|
||||
]
|
||||
|
||||
@route_get("lessons")
|
||||
def lessons(params):
|
||||
return {"lessons": lessons_data}
|
||||
@route_get("course")
|
||||
def course(params):
|
||||
course_name = sorted(set(lesson["course"] for lesson in lessons_data))
|
||||
return {"course": course_name}
|
||||
|
||||
@route_get("units")
|
||||
def units(params):
|
||||
@@ -53,6 +54,10 @@ def topics(params):
|
||||
topic_names = sorted(set(lesson["topic"] for lesson in lessons_data))
|
||||
return {"topics": topic_names}
|
||||
|
||||
@route_get("lessons")
|
||||
def lessons(params):
|
||||
return {"lessons": lessons_data}
|
||||
|
||||
@route_get("notes")
|
||||
def notes(params):
|
||||
notes_names = sorted(set(lesson["notes"] for lesson in lessons_data))
|
||||
|
||||
Reference in New Issue
Block a user