40 lines
776 B
Go
40 lines
776 B
Go
package logic
|
|
|
|
import (
|
|
"context"
|
|
|
|
"fusenapi/home-user-auth/internal/svc"
|
|
"fusenapi/home-user-auth/internal/types"
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
)
|
|
|
|
type UserFontsLogic struct {
|
|
logx.Logger
|
|
ctx context.Context
|
|
svcCtx *svc.ServiceContext
|
|
}
|
|
|
|
func NewUserFontsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserFontsLogic {
|
|
return &UserFontsLogic{
|
|
Logger: logx.WithContext(ctx),
|
|
ctx: ctx,
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
func (l *UserFontsLogic) UserFonts(req *types.Request) (resp *types.Response, err error) {
|
|
// todo: add your logic here and delete this line
|
|
f, err := l.svcCtx.FsFontModel.FindOne(context.TODO(), 10)
|
|
if err != nil {
|
|
// panic(err)
|
|
logx.Error(err)
|
|
return
|
|
}
|
|
logx.Info(f)
|
|
resp = &types.Response{
|
|
Data: f,
|
|
}
|
|
return
|
|
}
|