12345678910111213141516171819 |
- #!/usr/bin/env python3
- # -*- coding: utf-8 -*-
- from fastapi import APIRouter
- from app.admin.schema.auth import AuthGenTokenParam
- from app.admin.service.auth_service import auth_service
- from common.response.response_schema import ResponseModel, response_base
- router = APIRouter()
- @router.post(
- '/gen_token',
- summary='获取 token',
- description=''
- )
- async def get_token(
- obj: AuthGenTokenParam
- ) -> ResponseModel:
- data = await auth_service.gen_token(obj=obj)
- return response_base.success(data=data)
|