24 lines
598 B
Go
24 lines
598 B
Go
package controller
|
|
|
|
import (
|
|
"context"
|
|
|
|
"slogan-agent/common"
|
|
"slogan-agent/styleagent/model/dto"
|
|
"slogan-agent/styleagent/service"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
)
|
|
|
|
type avatar struct{}
|
|
|
|
var Avatar = new(avatar)
|
|
|
|
func (c *avatar) Build(ctx context.Context, req *dto.AvatarBuildReq) (res *dto.AvatarBuildRes, err error) {
|
|
return service.AvatarService.Build(ctx, common.GetUserId(g.RequestFromCtx(ctx)))
|
|
}
|
|
|
|
func (c *avatar) Get(ctx context.Context, req *dto.AvatarGetReq) (res *dto.AvatarGetRes, err error) {
|
|
return service.AvatarService.Get(ctx, common.GetUserId(g.RequestFromCtx(ctx)))
|
|
}
|