forked from Ailur/burgernotes-server
Attempt to fix the cursed subdomain architecture
This commit is contained in:
parent
e8c3b11165
commit
3007e9f3b6
2
go.mod
2
go.mod
|
@ -3,7 +3,7 @@ module git.ailur.dev/ailur/burgernotes
|
|||
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
|
@ -1,5 +1,7 @@
|
|||
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.2 h1:EWfeab+wJKaxx/Qg5TKpvZHicA0V/NilUv2g6W97rtg=
|
||||
git.ailur.dev/ailur/fg-nucleus-library v1.0.2/go.mod h1:T2mdUiXlZqb917CkNB2vwujkD/QhJDpCHLRvKuskBpY=
|
||||
github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw=
|
||||
|
|
7
main.go
7
main.go
|
@ -18,7 +18,6 @@ import (
|
|||
|
||||
library "git.ailur.dev/ailur/fg-library/v2"
|
||||
nucleusLibrary "git.ailur.dev/ailur/fg-nucleus-library"
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
"github.com/google/uuid"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
@ -227,7 +226,7 @@ func getUsername(token string, oauthHostName string, publicKey ed25519.PublicKey
|
|||
return responseData.Sub, responseData.Username, nil
|
||||
}
|
||||
|
||||
func Main(information library.ServiceInitializationInformation) *chi.Mux {
|
||||
func Main(information library.ServiceInitializationInformation) {
|
||||
var conn library.Database
|
||||
hostName := information.Configuration["hostName"].(string)
|
||||
|
||||
|
@ -384,7 +383,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")
|
||||
|
@ -752,6 +751,4 @@ func Main(information library.ServiceInitializationInformation) *chi.Mux {
|
|||
})
|
||||
|
||||
// TODO: Implement shared notes
|
||||
|
||||
return router
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue