chore: rename transactions to sessions (#4753)

This commit is contained in:
andig 2022-10-07 20:09:19 +02:00 • committed by GitHub
parent 8deef47165
commit a252fc1475
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 52 additions and 44 deletions

View file

@ -155,7 +155,7 @@ func sessionHandler(w http.ResponseWriter, r *http.Request) {
return
}
var res db.Transactions
var res db.Sessions
if txn := dbserver.Instance.Where("charged_kwh>=0.05").Order("created desc").Find(&res); txn.Error != nil {
jsonError(w, http.StatusInternalServerError, txn.Error)
return