Attempt to fix the cursed subdomain architecture
This commit is contained in:
parent
05cd559e34
commit
d057453d1d
2
go.mod
2
go.mod
|
@ -3,7 +3,7 @@ module git.ailur.dev/ailur/datatracker
|
|||
go 1.23.1
|
||||
|
||||
require (
|
||||
git.ailur.dev/ailur/fg-library/v2 v2.0.1
|
||||
git.ailur.dev/ailur/fg-library/v2 v2.1.0
|
||||
git.ailur.dev/ailur/fg-nucleus-library v1.0.2
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1
|
||||
github.com/google/uuid v1.6.0
|
||||
|
|
2
go.sum
2
go.sum
|
@ -2,6 +2,8 @@ git.ailur.dev/ailur/fg-library/v2 v2.0.0 h1:NanDV52W+NBu96v/HPDPGqH8NOxLp6MRrRdX
|
|||
git.ailur.dev/ailur/fg-library/v2 v2.0.0/go.mod h1:1jYbWhabGcIwp7CkhHqvRwC8eP+nHv5BrXPe9NX2HE8=
|
||||
git.ailur.dev/ailur/fg-library/v2 v2.0.1 h1:ltPYXf/Om0hnMD8gr1K5bkYrfHqKPSbb0hxa0wtTnZ0=
|
||||
git.ailur.dev/ailur/fg-library/v2 v2.0.1/go.mod h1:1jYbWhabGcIwp7CkhHqvRwC8eP+nHv5BrXPe9NX2HE8=
|
||||
git.ailur.dev/ailur/fg-library/v2 v2.1.0 h1:SsLZ56poM6GZPfV/ywU/8WDTelu2dtlPp6jzbEZ4hrA=
|
||||
git.ailur.dev/ailur/fg-library/v2 v2.1.0/go.mod h1:1jYbWhabGcIwp7CkhHqvRwC8eP+nHv5BrXPe9NX2HE8=
|
||||
git.ailur.dev/ailur/fg-nucleus-library v1.0.0 h1:TT1V4cfka+uUpvV1zU7bc4KXFkgnsI/sIvaZDDxXk+k=
|
||||
git.ailur.dev/ailur/fg-nucleus-library v1.0.0/go.mod h1:m4gNSEypfgrUV8bXaR8NLB8zchUM59y0ellV1wp/C+I=
|
||||
git.ailur.dev/ailur/fg-nucleus-library v1.0.2 h1:EWfeab+wJKaxx/Qg5TKpvZHicA0V/NilUv2g6W97rtg=
|
||||
|
|
7
main.go
7
main.go
|
@ -11,7 +11,6 @@ import (
|
|||
|
||||
library "git.ailur.dev/ailur/fg-library/v2"
|
||||
authLibrary "git.ailur.dev/ailur/fg-nucleus-library"
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
"github.com/google/uuid"
|
||||
"html/template"
|
||||
|
@ -161,7 +160,7 @@ func verifyJwt(token string, publicKey ed25519.PublicKey, conn library.Database)
|
|||
return claims, true
|
||||
}
|
||||
|
||||
func Main(information library.ServiceInitializationInformation) *chi.Mux {
|
||||
func Main(information library.ServiceInitializationInformation) {
|
||||
var conn library.Database
|
||||
hostName := information.Configuration["hostName"].(string)
|
||||
|
||||
|
@ -328,7 +327,7 @@ func Main(information library.ServiceInitializationInformation) *chi.Mux {
|
|||
}
|
||||
|
||||
// Set up the router
|
||||
router := chi.NewRouter()
|
||||
router := information.Router
|
||||
|
||||
// Set up the static routes
|
||||
staticDir, err := fs.Sub(information.ResourceDir, "static")
|
||||
|
@ -642,6 +641,4 @@ func Main(information library.ServiceInitializationInformation) *chi.Mux {
|
|||
"AuthorizationUri": oauthHostName,
|
||||
}, "oauth.html", information)
|
||||
})
|
||||
|
||||
return router
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue