You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
498 B

package after
import (
"recook/internal/v2/model/recook/after"
)
var ProofLogic = &afterProofLogic{}
type afterProofLogic struct {
}
type AFTProofReq struct {
AsID uint `json:"asID" binding:"required"`
URLs []string `json:"urls" binding:"required"`
}
func (o afterProofLogic) Add(q *AFTProofReq) error {
var r after.RecookAfterSalesProofModel
tx := r.Begin()
{
if err := saveProof(tx, q.URLs, q.AsID); err != nil {
tx.Rollback()
return err
}
tx.Commit()
}
return nil
}