You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OneAuth/init.go

29 lines
554 B
Go

//
// Copyright (C) 2025 veypi <i@veypi.com>
// 2025-03-04 16:08:06
// Distributed under terms of the MIT license.
//
package OneAuth
import (
"embed"
"github.com/veypi/OneAuth/api"
"github.com/veypi/vyes-ui"
"github.com/vyes/vigo"
"github.com/vyes/vigo/contrib/cors"
"github.com/vyes/vigo/contrib/vyes"
)
var Router = vigo.NewRouter()
//go:embed ui/*
var uifs embed.FS
var (
_ = Router.Extend("v", vyesui.Router)
_ = Router.Extend("api", api.Router)
_ = Router.SubRouter("/*path").UseBefore(cors.AllowAny)
_ = vyes.WrapUI(Router, uifs)
)