feat: swagger接口文档更新1.0.8
This commit is contained in:
@@ -33,6 +33,15 @@ type AccountController struct {
|
||||
// 系统登录
|
||||
//
|
||||
// POST /login
|
||||
//
|
||||
// @Tags common/authorization
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param data body object true "Request Param"
|
||||
// @Success 200 {object} object "Response Results"
|
||||
// @Summary System Login
|
||||
// @Description System Login
|
||||
// @Router /login [post]
|
||||
func (s *AccountController) Login(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
var loginBody commonModel.LoginBody
|
||||
@@ -89,6 +98,15 @@ func (s *AccountController) Login(c *gin.Context) {
|
||||
// 登录用户信息
|
||||
//
|
||||
// GET /getInfo
|
||||
//
|
||||
// @Tags common/authorization
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} object "Response Results"
|
||||
// @Security ApiKeyAuth
|
||||
// @Summary Login User Information
|
||||
// @Description Login User Information
|
||||
// @Router /getInfo [get]
|
||||
func (s *AccountController) Info(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
loginUser, err := ctx.LoginUser(c)
|
||||
@@ -117,6 +135,15 @@ func (s *AccountController) Info(c *gin.Context) {
|
||||
// 登录用户路由信息
|
||||
//
|
||||
// GET /getRouters
|
||||
//
|
||||
// @Tags common/authorization
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} object "Response Results"
|
||||
// @Security ApiKeyAuth
|
||||
// @Summary Login User Routing Information
|
||||
// @Description Login User Routing Information
|
||||
// @Router /getRouters [get]
|
||||
func (s *AccountController) Router(c *gin.Context) {
|
||||
userID := ctx.LoginUserToUserID(c)
|
||||
|
||||
@@ -143,6 +170,15 @@ func (s *AccountController) Router(c *gin.Context) {
|
||||
// 系统登出
|
||||
//
|
||||
// POST /logout
|
||||
//
|
||||
// @Tags common/authorization
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} object "Response Results"
|
||||
// @Security ApiKeyAuth
|
||||
// @Summary System Logout
|
||||
// @Description System Logout
|
||||
// @Router /logout [post]
|
||||
func (s *AccountController) Logout(c *gin.Context) {
|
||||
language := ctx.AcceptLanguage(c)
|
||||
tokenStr := ctx.Authorization(c)
|
||||
|
||||
Reference in New Issue
Block a user