portal/api/api.go

20 lines
432 B
Go
Raw Normal View History

2024-01-12 00:11:53 +00:00
package api
import (
"git.lumeweb.com/LumeWeb/portal/interfaces"
"github.com/julienschmidt/httprouter"
)
2024-01-12 00:11:53 +00:00
func Init(router interfaces.APIRegistry) error {
router.Register("s5", NewS5())
2024-01-12 00:11:53 +00:00
return nil
}
func registerProtocolSubdomain(portal interfaces.Portal, mux *httprouter.Router, name string) {
router := portal.ApiRegistry().Router()
2024-01-12 04:22:33 +00:00
domain := portal.Config().GetString("core.domain")
2024-01-12 04:22:56 +00:00
(*router)[name+"."+domain] = mux
}