feat: 添加交易记录的创建和查询API处理器
This commit is contained in:
@@ -148,6 +148,10 @@ func (h *TransactionHandler) GetTransactions(c *gin.Context) {
|
||||
api.BadRequest(c, "Invalid end_date format. Use YYYY-MM-DD or RFC3339 format")
|
||||
return
|
||||
}
|
||||
// If input is just a date (YYYY-MM-DD), set it to the end of that day to be inclusive
|
||||
if len(endDateStr) == 10 {
|
||||
endDate = time.Date(endDate.Year(), endDate.Month(), endDate.Day(), 23, 59, 59, 999999999, endDate.Location())
|
||||
}
|
||||
input.EndDate = &endDate
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user