Skip to content

Commit

Permalink
Update date validation
Browse files Browse the repository at this point in the history
  • Loading branch information
satraul committed Sep 2, 2020
1 parent 2fb3673 commit 71850e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api_bca.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ func (a *BCAApiService) AccountStatementView(ctx _context.Context, startDate tim
if startDate.After(endDate) {
return localVarReturnValue, errors.New("date invalid: start date must be before end date")
}
if endDate.AddDate(0, 0, -7).Before(startDate) {
return localVarReturnValue, errors.New("date invalid: range must be less than 7 days")
if endDate.Sub(startDate) > time.Hour*24*27 {
return localVarReturnValue, errors.New("date invalid: range must be less than 27 days")
}

// create path and map variables
Expand Down

0 comments on commit 71850e0

Please sign in to comment.