feat: done
This commit is contained in:
32
backend/app/http/tenant/me.go
Normal file
32
backend/app/http/tenant/me.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package tenant
|
||||
|
||||
import (
|
||||
"quyun/v2/app/http/tenant/dto"
|
||||
"quyun/v2/database/models"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
// @provider
|
||||
type me struct{}
|
||||
|
||||
// get
|
||||
//
|
||||
// @Summary 当前租户上下文信息
|
||||
// @Tags Tenant
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param tenant_code path string true "Tenant Code"
|
||||
// @Success 200 {object} dto.MeResponse
|
||||
//
|
||||
// @Router /t/:tenant_code/v1/me [get]
|
||||
// @Bind tenant local key(tenant)
|
||||
// @Bind user local key(user)
|
||||
// @Bind tenantUser local key(tenant_user)
|
||||
func (*me) get(ctx fiber.Ctx, tenant *models.Tenant, user *models.User, tenantUser *models.TenantUser) (*dto.MeResponse, error) {
|
||||
return &dto.MeResponse{
|
||||
Tenant: tenant,
|
||||
User: user,
|
||||
TenantUser: tenantUser,
|
||||
}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user