Compare commits
1 Commits
mileage_on
...
update-git
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d314ed4a16 |
4
server/.gitignore
vendored
4
server/.gitignore
vendored
@@ -12,6 +12,10 @@
|
|||||||
*.out
|
*.out
|
||||||
*.db
|
*.db
|
||||||
|
|
||||||
|
# MS VSCode
|
||||||
|
.vscode
|
||||||
|
__debug_bin
|
||||||
|
|
||||||
# Dependency directories (remove the comment below to include it)
|
# Dependency directories (remove the comment below to include it)
|
||||||
# vendor/
|
# vendor/
|
||||||
assets/*
|
assets/*
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"sort"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/akhilrex/hammond/db"
|
"github.com/akhilrex/hammond/db"
|
||||||
@@ -16,9 +15,6 @@ func GetMileageByVehicleId(vehicleId string, since time.Time) (mileage []models.
|
|||||||
|
|
||||||
fillups := make([]db.Fillup, len(*data))
|
fillups := make([]db.Fillup, len(*data))
|
||||||
copy(fillups, *data)
|
copy(fillups, *data)
|
||||||
sort.Slice(fillups, func(i, j int) bool {
|
|
||||||
return fillups[i].OdoReading > fillups[j].OdoReading
|
|
||||||
})
|
|
||||||
|
|
||||||
var mileages []models.MileageModel
|
var mileages []models.MileageModel
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user