2024-01-12 00:11:53 +00:00
|
|
|
package api
|
|
|
|
|
2024-01-12 04:13:10 +00:00
|
|
|
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 {
|
2024-01-12 04:13:10 +00:00
|
|
|
router.Register("s5", NewS5())
|
2024-01-12 00:11:53 +00:00
|
|
|
return nil
|
|
|
|
}
|
2024-01-12 04:13:10 +00:00
|
|
|
|
|
|
|
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:13:10 +00:00
|
|
|
|
2024-01-12 04:22:56 +00:00
|
|
|
(*router)[name+"."+domain] = mux
|
2024-01-12 04:13:10 +00:00
|
|
|
}
|