🎨 prepare to make the database name configurable

We should not hardcode the database name at different places in
db.Init(). This will allow to make the database path configurable
in a later change, and importantly prevent discrepancies
This commit is contained in:
2024-01-17 22:24:18 +01:00
parent 49281f2ca8
commit 80d565e978
2 changed files with 8 additions and 4 deletions

View File

@ -29,9 +29,12 @@ import (
// @description Type "Bearer" followed by a space and JWT token.
func main() {
db.Init()
gin.SetMode(gin.DebugMode)
db.Init("hostname-service.db")
router := gin.Default()
docs.SwaggerInfo.Host = "localhost:8080"
docs.SwaggerInfo.BasePath = "/api/v1"