mirror of
https://github.com/ae-utbm/sith.git
synced 2025-10-30 00:23:54 +00:00
17 lines
416 B
Python
17 lines
416 B
Python
from ninja_extra import ControllerBase, api_controller, route
|
|
|
|
from api.auth import ApiKeyAuth
|
|
from api.schemas import ApiClientSchema
|
|
|
|
|
|
@api_controller("/client")
|
|
class ApiClientController(ControllerBase):
|
|
@route.get(
|
|
"/me",
|
|
auth=[ApiKeyAuth()],
|
|
response=ApiClientSchema,
|
|
url_name="api-client-infos",
|
|
)
|
|
def get_client_info(self):
|
|
return self.context.request.auth
|