21 lines
423 B
Go
21 lines
423 B
Go
package controller
|
|
|
|
import (
|
|
"context"
|
|
|
|
"slogan-agent/styleagent/model/dto"
|
|
"slogan-agent/styleagent/service"
|
|
)
|
|
|
|
type hairstyle struct{}
|
|
|
|
var Hairstyle = new(hairstyle)
|
|
|
|
func (c *hairstyle) List(ctx context.Context, req *dto.HairstyleListReq) (res *dto.HairstyleListRes, err error) {
|
|
list, err := service.HairstyleService.List(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &dto.HairstyleListRes{List: list}, nil
|
|
}
|