2023-08-18 09:59:43 +00:00
|
|
|
package handler
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2023-09-25 05:58:49 +00:00
|
|
|
|
|
|
|
"github.com/huoxue1/min-report/module"
|
2023-08-18 09:59:43 +00:00
|
|
|
"github.com/huoxue1/min-report/pojo"
|
|
|
|
)
|
|
|
|
|
2023-09-25 05:58:49 +00:00
|
|
|
func Report(ctx context.Context, req *pojo.ReportData) (*pojo.CommonResp, error) {
|
|
|
|
_, err := module.GetReportEngine().Insert(req)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2023-08-18 09:59:43 +00:00
|
|
|
return &pojo.CommonResp{}, nil
|
|
|
|
}
|