Sets up internal packages for database and api

This commit is contained in:
Dennis Schoepf 2024-04-28 19:14:51 +02:00
parent b059fa25cb
commit d82a1c9215
4 changed files with 15 additions and 15 deletions

View file

@ -1,6 +1,7 @@
package api
import (
"database/sql"
"errors"
"os"
@ -8,7 +9,7 @@ import (
"github.com/gofiber/fiber/v2/middleware/keyauth"
)
func Setup(app *fiber.App) error {
func Setup(app *fiber.App, db *sql.DB) error {
apiKey := os.Getenv("API_KEY")
if apiKey == "" {