1111
1212routes = {
1313 'demo' : {
14- 'graph_theory' : "/demo/graph-theory"
14+ 'graph_theory' : {
15+ 'display_name' : "Graph Theory" ,
16+ 'route' : "/demo/graph-theory"
17+ }
1518 },
1619 'comp2804' : {
17- 'bitstrings-of-length' : "/comp2804/bitstrings-of-length" ,
18- 'set-theory-question' : "/comp2804/set-theory" ,
19- 'num-of-functions' : "/comp2804/num-of-functions"
20+ 'bitstrings-of-length' : {
21+ 'display_name' : "Bitstrings of Length" ,
22+ 'route' : "/comp2804/bitstrings-of-length"
23+ },
24+ 'set-theory-question' : {
25+ 'display_name' : "Set Theory" ,
26+ 'route' : "/comp2804/set-theory"
27+ },
28+ 'num-of-functions' : {
29+ 'display_name' : "Number of Functions" ,
30+ 'route' : "/comp2804/num-of-functions"
31+ }
2032 }
21-
2233}
2334
2435
@@ -27,23 +38,23 @@ async def get_generators():
2738 return routes
2839
2940
30- @router .get (routes ['demo' ]['graph_theory' ])
41+ @router .get (routes ['demo' ]['graph_theory' ][ 'route' ] )
3142async def generate_graph_theory_question ():
3243 return graph_theory_question_generator .call ()
3344
3445
35- @router .get (routes ['comp2804' ]['set-theory-question' ])
46+ @router .get (routes ['comp2804' ]['set-theory-question' ][ 'route' ] )
3647async def generate_set_theory_question ():
3748 return set_theory_question_generator .call ()
3849
3950
40- @router .get (routes ['comp2804' ]['num-of-functions' ])
51+ @router .get (routes ['comp2804' ]['num-of-functions' ][ 'route' ] )
4152async def generate_num_of_functions_question (
4253 lower_range : int = 0 , upper_range : int = 10
4354):
4455 return num_of_functions_generator .call (lower_range , upper_range )
4556
4657
47- @router .get (routes ['comp2804' ]['bitstrings-of-length' ])
58+ @router .get (routes ['comp2804' ]['bitstrings-of-length' ][ 'route' ] )
4859async def bitstrings_of_length_question ():
4960 return bitstrings_of_length_generator .call ()
0 commit comments