refactor: refactor interface
This commit is contained in:
parent
eab8c63e3d
commit
751bab15d1
|
@ -20,7 +20,7 @@ func NewBillService(r BillRepository) BillService {
|
|||
// - date is {year, month} when return a month bills
|
||||
// - date is {year} when return a year bills
|
||||
// - date is {} when return all bills
|
||||
func (b *billService) GetBills(ctx context.Context, date BDate) (*[]Bill, error) {
|
||||
func (b *billService) GetBills(ctx context.Context, date BDate) ([]Bill, error) {
|
||||
if date.Year == 0 && (date.Month != 0 || date.Day != 0) {
|
||||
date.Year = time.Now().Year()
|
||||
} else if date.Month == 0 && date.Day != 0 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user