diff --git a/server/common/utils.go b/server/common/utils.go index ba0bb50..b71dd0c 100644 --- a/server/common/utils.go +++ b/server/common/utils.go @@ -7,7 +7,8 @@ import ( "os" "time" - "github.com/akhilrex/hammond/db" + "hammond/db" + "github.com/dgrijalva/jwt-go" "github.com/gin-gonic/gin" "github.com/gin-gonic/gin/binding" diff --git a/server/controllers/auth.go b/server/controllers/auth.go index a80b1b8..7617e9e 100644 --- a/server/controllers/auth.go +++ b/server/controllers/auth.go @@ -7,10 +7,11 @@ import ( "os" "strings" - "github.com/akhilrex/hammond/common" - "github.com/akhilrex/hammond/db" - "github.com/akhilrex/hammond/models" - "github.com/akhilrex/hammond/service" + "hammond/common" + "hammond/db" + "hammond/models" + "hammond/service" + "github.com/dgrijalva/jwt-go" "github.com/gin-gonic/gin" ) diff --git a/server/controllers/files.go b/server/controllers/files.go index 8831572..a8b97ba 100644 --- a/server/controllers/files.go +++ b/server/controllers/files.go @@ -5,10 +5,11 @@ import ( "net/http" "os" - "github.com/akhilrex/hammond/common" - "github.com/akhilrex/hammond/db" - "github.com/akhilrex/hammond/models" - "github.com/akhilrex/hammond/service" + "hammond/common" + "hammond/db" + "hammond/models" + "hammond/service" + "github.com/gin-gonic/gin" ) diff --git a/server/controllers/import.go b/server/controllers/import.go index fab641e..17b0a0a 100644 --- a/server/controllers/import.go +++ b/server/controllers/import.go @@ -4,7 +4,8 @@ import ( "net/http" "strconv" - "github.com/akhilrex/hammond/service" + "hammond/service" + "github.com/gin-gonic/gin" ) diff --git a/server/controllers/masters.go b/server/controllers/masters.go index edf30d6..1813175 100644 --- a/server/controllers/masters.go +++ b/server/controllers/masters.go @@ -3,10 +3,11 @@ package controllers import ( "net/http" - "github.com/akhilrex/hammond/common" - "github.com/akhilrex/hammond/db" - "github.com/akhilrex/hammond/models" - "github.com/akhilrex/hammond/service" + "hammond/common" + "hammond/db" + "hammond/models" + "hammond/service" + "github.com/gin-gonic/gin" ) diff --git a/server/controllers/middlewares.go b/server/controllers/middlewares.go index 6dfede7..fd03749 100644 --- a/server/controllers/middlewares.go +++ b/server/controllers/middlewares.go @@ -5,7 +5,8 @@ import ( "os" "strings" - "github.com/akhilrex/hammond/db" + "hammond/db" + "github.com/dgrijalva/jwt-go" "github.com/dgrijalva/jwt-go/request" "github.com/gin-gonic/gin" diff --git a/server/controllers/reports.go b/server/controllers/reports.go index 6db3f10..26b9e76 100644 --- a/server/controllers/reports.go +++ b/server/controllers/reports.go @@ -3,9 +3,10 @@ package controllers import ( "net/http" - "github.com/akhilrex/hammond/common" - "github.com/akhilrex/hammond/models" - "github.com/akhilrex/hammond/service" + "hammond/common" + "hammond/models" + "hammond/service" + "github.com/gin-gonic/gin" ) diff --git a/server/controllers/setup.go b/server/controllers/setup.go index 13f1ce3..ef0050d 100644 --- a/server/controllers/setup.go +++ b/server/controllers/setup.go @@ -4,10 +4,11 @@ import ( "fmt" "net/http" - "github.com/akhilrex/hammond/common" - "github.com/akhilrex/hammond/db" - "github.com/akhilrex/hammond/models" - "github.com/akhilrex/hammond/service" + "hammond/common" + "hammond/db" + "hammond/models" + "hammond/service" + "github.com/gin-gonic/gin" ) diff --git a/server/controllers/users.go b/server/controllers/users.go index e9ad2ad..90c16f4 100644 --- a/server/controllers/users.go +++ b/server/controllers/users.go @@ -3,10 +3,11 @@ package controllers import ( "net/http" - "github.com/akhilrex/hammond/common" - "github.com/akhilrex/hammond/db" - "github.com/akhilrex/hammond/models" - "github.com/akhilrex/hammond/service" + "hammond/common" + "hammond/db" + "hammond/models" + "hammond/service" + "github.com/gin-gonic/gin" ) diff --git a/server/controllers/vehicle.go b/server/controllers/vehicle.go index a2c0f32..b94071e 100644 --- a/server/controllers/vehicle.go +++ b/server/controllers/vehicle.go @@ -4,9 +4,10 @@ import ( "errors" "net/http" - "github.com/akhilrex/hammond/common" - "github.com/akhilrex/hammond/models" - "github.com/akhilrex/hammond/service" + "hammond/common" + "hammond/models" + "hammond/service" + "github.com/gin-gonic/gin" ) diff --git a/server/go.mod b/server/go.mod index 71194ef..66898a5 100644 --- a/server/go.mod +++ b/server/go.mod @@ -1,4 +1,4 @@ -module github.com/akhilrex/hammond +module hammond go 1.16 diff --git a/server/main.go b/server/main.go index 1d320dc..7f352e4 100644 --- a/server/main.go +++ b/server/main.go @@ -5,9 +5,10 @@ import ( "log" "os" - "github.com/akhilrex/hammond/controllers" - "github.com/akhilrex/hammond/db" - "github.com/akhilrex/hammond/service" + "hammond/controllers" + "hammond/db" + "hammond/service" + "github.com/gin-contrib/location" "github.com/gin-gonic/contrib/static" "github.com/gin-gonic/gin" diff --git a/server/models/alert.go b/server/models/alert.go index f33b572..7756dfa 100644 --- a/server/models/alert.go +++ b/server/models/alert.go @@ -3,7 +3,7 @@ package models import ( "time" - "github.com/akhilrex/hammond/db" + "hammond/db" ) type CreateAlertModel struct { diff --git a/server/models/auth.go b/server/models/auth.go index 8868b32..1d88add 100644 --- a/server/models/auth.go +++ b/server/models/auth.go @@ -1,6 +1,6 @@ package models -import "github.com/akhilrex/hammond/db" +import "hammond/db" type LoginResponse struct { Name string `json:"name"` diff --git a/server/models/misc.go b/server/models/misc.go index 7f29dce..3171db2 100644 --- a/server/models/misc.go +++ b/server/models/misc.go @@ -1,6 +1,6 @@ package models -import "github.com/akhilrex/hammond/db" +import "hammond/db" type UpdateSettingModel struct { Currency string `json:"currency" form:"currency" query:"currency"` diff --git a/server/models/report.go b/server/models/report.go index c436b84..ffe44c2 100644 --- a/server/models/report.go +++ b/server/models/report.go @@ -4,7 +4,7 @@ import ( "encoding/json" "time" - "github.com/akhilrex/hammond/db" + "hammond/db" ) type MileageModel struct { diff --git a/server/models/vehicle.go b/server/models/vehicle.go index 4373cc3..69b6cf9 100644 --- a/server/models/vehicle.go +++ b/server/models/vehicle.go @@ -3,7 +3,8 @@ package models import ( "time" - "github.com/akhilrex/hammond/db" + "hammond/db" + _ "github.com/go-playground/validator/v10" ) diff --git a/server/service/alertSevice.go b/server/service/alertSevice.go index 9e7462c..74ea1d4 100644 --- a/server/service/alertSevice.go +++ b/server/service/alertSevice.go @@ -4,8 +4,8 @@ import ( "errors" "time" - "github.com/akhilrex/hammond/db" - "github.com/akhilrex/hammond/models" + "hammond/db" + "hammond/models" ) func CreateAlert(model models.CreateAlertModel, vehicleId, userId string) (*db.VehicleAlert, error) { diff --git a/server/service/drivvoImportService.go b/server/service/drivvoImportService.go index 567c951..010f636 100644 --- a/server/service/drivvoImportService.go +++ b/server/service/drivvoImportService.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/akhilrex/hammond/db" + "hammond/db" ) func DrivvoParseExpenses(content []byte, user *db.User, vehicle *db.Vehicle) ([]db.Expense, []string) { diff --git a/server/service/fileService.go b/server/service/fileService.go index 423171e..d0dd509 100644 --- a/server/service/fileService.go +++ b/server/service/fileService.go @@ -13,9 +13,10 @@ import ( "strconv" "time" - "github.com/akhilrex/hammond/db" - "github.com/akhilrex/hammond/internal/sanitize" - "github.com/akhilrex/hammond/models" + "hammond/db" + "hammond/internal/sanitize" + "hammond/models" + uuid "github.com/satori/go.uuid" ) diff --git a/server/service/fuellyImportService.go b/server/service/fuellyImportService.go index 6b4da88..b20c4ae 100644 --- a/server/service/fuellyImportService.go +++ b/server/service/fuellyImportService.go @@ -7,7 +7,8 @@ import ( "strconv" "time" - "github.com/akhilrex/hammond/db" + "hammond/db" + "github.com/leekchan/accounting" ) diff --git a/server/service/importService.go b/server/service/importService.go index b8850c4..60192c2 100644 --- a/server/service/importService.go +++ b/server/service/importService.go @@ -3,7 +3,7 @@ package service import ( "bytes" - "github.com/akhilrex/hammond/db" + "hammond/db" ) func WriteToDB(fillups []db.Fillup, expenses []db.Expense) []string { diff --git a/server/service/miscService.go b/server/service/miscService.go index d56fd2c..ef344a3 100644 --- a/server/service/miscService.go +++ b/server/service/miscService.go @@ -1,7 +1,7 @@ package service import ( - "github.com/akhilrex/hammond/db" + "hammond/db" ) func CanInitializeSystem() (bool, error) { diff --git a/server/service/reportService.go b/server/service/reportService.go index 7daf69b..079adbf 100644 --- a/server/service/reportService.go +++ b/server/service/reportService.go @@ -4,9 +4,9 @@ import ( "sort" "time" - "github.com/akhilrex/hammond/common" - "github.com/akhilrex/hammond/db" - "github.com/akhilrex/hammond/models" + "hammond/common" + "hammond/db" + "hammond/models" ) func GetMileageByVehicleId(vehicleId string, since time.Time, mileageOption string) (mileage []models.MileageModel, err error) { diff --git a/server/service/userService.go b/server/service/userService.go index 8a225e6..c3a91df 100644 --- a/server/service/userService.go +++ b/server/service/userService.go @@ -3,8 +3,8 @@ package service import ( "strings" - "github.com/akhilrex/hammond/db" - "github.com/akhilrex/hammond/models" + "hammond/db" + "hammond/models" ) func CreateUser(userModel *models.RegisterRequest, role db.Role) error { diff --git a/server/service/vehicleService.go b/server/service/vehicleService.go index a26d24f..488b700 100644 --- a/server/service/vehicleService.go +++ b/server/service/vehicleService.go @@ -3,8 +3,9 @@ package service import ( "fmt" - "github.com/akhilrex/hammond/db" - "github.com/akhilrex/hammond/models" + "hammond/db" + "hammond/models" + "gorm.io/gorm" "gorm.io/gorm/clause" )