feat: call admin ensure function
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user