feat: call admin ensure function

This commit is contained in:
2025-05-18 20:16:26 +02:00
parent 24a9c8a9ac
commit 7d6a521f12

View File

@ -7,6 +7,7 @@ import (
"gitea.local/admin/hspguard/cmd/hspguard/api"
"gitea.local/admin/hspguard/internal/repository"
"gitea.local/admin/hspguard/internal/user"
"github.com/jackc/pgx/v5"
)
@ -21,6 +22,8 @@ func main() {
repo := repository.New(conn)
user.EnsureAdminUser(ctx, repo)
server := api.NewAPIServer(":3000", repo)
if err := server.Run(); err != nil {
log.Fatalln("ERR: Failed to start server:", err)