Add grouping by outlet_id
This commit is contained in:
@@ -196,10 +196,11 @@ func (s *AnalyticsServiceImpl) validatePurchasingAnalyticsRequest(req *models.Pu
|
||||
|
||||
if req.GroupBy != "" {
|
||||
validGroupBy := map[string]bool{
|
||||
"day": true,
|
||||
"hour": true,
|
||||
"week": true,
|
||||
"month": true,
|
||||
"day": true,
|
||||
"hour": true,
|
||||
"week": true,
|
||||
"month": true,
|
||||
"outlet_id": true,
|
||||
}
|
||||
if !validGroupBy[req.GroupBy] {
|
||||
return fmt.Errorf("invalid group_by value: %s", req.GroupBy)
|
||||
|
||||
Reference in New Issue
Block a user