31 lines
759 B
Go
31 lines
759 B
Go
package feedbackser
|
|
|
|
import (
|
|
"videoweb/app/service/authser"
|
|
"videoweb/app/service/upstream"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
const addPath = "/api/app/feedback/add"
|
|
|
|
const contactUsAddPath = "/api/app/contactus/add"
|
|
|
|
// Add 调用上游提交意见反馈。
|
|
func Add(c *gin.Context, req FeedbackReq) (*authser.APIEnvelope, error) {
|
|
var env authser.APIEnvelope
|
|
if _, err := upstream.PostJSON(c, addPath, req, &env); err != nil {
|
|
return nil, err
|
|
}
|
|
return &env, nil
|
|
}
|
|
|
|
// AddContactUs 调用上游联系我们接口。
|
|
func AddContactUs(c *gin.Context, req ContactUsAddReq) (*authser.APIEnvelope, error) {
|
|
var env authser.APIEnvelope
|
|
if _, err := upstream.PostJSON(c, contactUsAddPath, req, &env); err != nil {
|
|
return nil, err
|
|
}
|
|
return &env, nil
|
|
}
|