Sets up internal packages for database and api
This commit is contained in:
parent
b059fa25cb
commit
d82a1c9215
4 changed files with 15 additions and 15 deletions
|
|
@ -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 == "" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue