]>
Commit | Line | Data |
---|---|---|
a4b75251 TL |
1 | from ._router import Router |
2 | ||
3 | ||
4 | class APIRouter(Router): | |
5 | def __init__(self, path, security_scope=None, secure=True): | |
6 | super().__init__(path, base_url="/api", | |
7 | security_scope=security_scope, | |
8 | secure=secure) | |
9 | ||
10 | def __call__(self, cls): | |
11 | cls = super().__call__(cls) | |
12 | cls._api_endpoint = True | |
13 | return cls |