17 lines
322 B
Go
17 lines
322 B
Go
package handler
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/huoxue1/min-report/module"
|
|
"github.com/huoxue1/min-report/pojo"
|
|
)
|
|
|
|
func Report(ctx context.Context, req *pojo.ReportData) (*pojo.CommonResp, error) {
|
|
_, err := module.GetReportEngine().Insert(req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &pojo.CommonResp{}, nil
|
|
}
|