-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathurls.py
More file actions
41 lines (35 loc) · 1.04 KB
/
urls.py
File metadata and controls
41 lines (35 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from fastapi import APIRouter
from mountain_madness._2026 import CounterResponse, mm_counter
router = APIRouter(
prefix="/mm",
tags=["Mountain Madness"],
)
@router.get(
"/counters",
description="Get both counters",
response_description="Get both counters",
response_model=CounterResponse,
operation_id="mm_get_counters",
)
async def get_all_counters():
return CounterResponse(**mm_counter.get_all())
# @router.post(
# "/good",
# description="Increment the good counter",
# response_description="Increment the good counter",
# response_model=CounterResponse,
# operation_id="mm_good_increment",
# )
# async def increment_good():
# return CounterResponse(**mm_counter.increment("good"))
#
#
# @router.post(
# "/evil",
# description="Increment the evil counter",
# response_description="Increment the evil counter",
# response_model=CounterResponse,
# operation_id="mm_evil_increment",
# )
# async def increment_evil():
# return CounterResponse(**mm_counter.increment("evil"))