feat: ad manager
This commit is contained in:
@@ -2,9 +2,7 @@ package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"lone-services/pkg/log"
|
||||
"lone-services/pkg/utils"
|
||||
"lone-services/pkg/validate"
|
||||
ad "lone-services/rpc/ad/pb"
|
||||
@@ -50,9 +48,9 @@ func (l *CreateLogic) Create(in *ad.CreateReq) (*ad.Response, error) {
|
||||
AdminName: adminInfo.Name,
|
||||
}
|
||||
if err := (model.AdModel{}.Init().Create(&data)); err != nil {
|
||||
log.Errorf("create ad: %v", err)
|
||||
l.Errorf("create ad: %v", err)
|
||||
return failResponse(utils.Fail), nil
|
||||
}
|
||||
|
||||
return okResponse(strconv.Itoa(data.Id)), nil
|
||||
return okResponse(utils.StringEmpty), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user