Files
video-factory/shortdrama/controller/config_controller.go
T
2026-06-18 16:01:39 +08:00

22 lines
540 B
Go

package controller
import (
"context"
"video-factory/shortdrama/model/dto"
"video-factory/shortdrama/service"
)
type config struct{}
var Config = new(config)
func (c *config) Get(ctx context.Context, req *dto.GetModelConfigReq) (res *dto.GetModelConfigRes, err error) {
cfg := service.ConfigService.Get(ctx)
return &dto.GetModelConfigRes{ModelConfig: cfg}, nil
}
func (c *config) Save(ctx context.Context, req *dto.SaveModelConfigReq) (res *struct{}, err error) {
return nil, service.ConfigService.Save(ctx, &req.ModelConfig)
}