Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ed99c7ce5f | |||
| 639585ec08 | |||
| fbd6ea7fb2 |
2
go.mod
2
go.mod
@@ -9,7 +9,7 @@ require (
|
||||
github.com/rs/cors v1.10.1
|
||||
github.com/uptrace/bunrouter v1.0.21
|
||||
go.elara.ws/logger v0.0.0-20230421022458-e80700db2090
|
||||
go.elara.ws/salix v0.0.0-20231228151958-745b6c0e5f10
|
||||
go.elara.ws/salix v0.0.0-20240119074218-9bf56b50a461
|
||||
golang.org/x/text v0.13.0
|
||||
lure.sh/lure v0.1.4-0.20231223033536-5dc31f43aa39
|
||||
)
|
||||
|
||||
4
go.sum
4
go.sum
@@ -128,8 +128,8 @@ github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1z
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
go.elara.ws/logger v0.0.0-20230421022458-e80700db2090 h1:RVC8XvWo6Yw4HUshqx4TSzuBDScDghafU6QFRJ4xPZg=
|
||||
go.elara.ws/logger v0.0.0-20230421022458-e80700db2090/go.mod h1:qng49owViqsW5Aey93lwBXONw20oGbJIoLVscB16mPM=
|
||||
go.elara.ws/salix v0.0.0-20231228151958-745b6c0e5f10 h1:Z0XcJexULcFf0ITcvQml/z+c/RW4fpon3nDWuoDcr3Q=
|
||||
go.elara.ws/salix v0.0.0-20231228151958-745b6c0e5f10/go.mod h1:niWia13iw7qDrS1C1mlqv5hxO1sunt8CcOQAB5yVlNU=
|
||||
go.elara.ws/salix v0.0.0-20240119074218-9bf56b50a461 h1:vVyRue86HMRBEguyDUoarLEQjVKQ/r8x6kX3qGgvVkM=
|
||||
go.elara.ws/salix v0.0.0-20240119074218-9bf56b50a461/go.mod h1:niWia13iw7qDrS1C1mlqv5hxO1sunt8CcOQAB5yVlNU=
|
||||
go.elara.ws/vercmp v0.0.0-20230622214216-0b2b067575c4 h1:Ep54XceQlKhcCHl9awG+wWP4kz4kIP3c3Lzw/Gc/zwY=
|
||||
go.elara.ws/vercmp v0.0.0-20230622214216-0b2b067575c4/go.mod h1:/7PNW7nFnDR5W7UXZVc04gdVLR/wBNgkm33KgIz0OBk=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
|
||||
6
main.go
6
main.go
@@ -10,6 +10,7 @@ import (
|
||||
"go.elara.ws/logger"
|
||||
"go.elara.ws/logger/log"
|
||||
"lure.sh/lure/pkg/loggerctx"
|
||||
"lure.sh/lure/pkg/repos"
|
||||
)
|
||||
|
||||
//go:embed static
|
||||
@@ -27,6 +28,11 @@ func main() {
|
||||
|
||||
ctx := loggerctx.With(context.Background(), log.Logger)
|
||||
|
||||
err := repos.Pull(ctx, nil)
|
||||
if err != nil {
|
||||
log.Fatal("Error pulling repos").Err(err).Send()
|
||||
}
|
||||
|
||||
registerBadge(mux)
|
||||
registerSite(mux)
|
||||
registerAPI(mux)
|
||||
|
||||
5
site.go
5
site.go
@@ -48,6 +48,11 @@ func registerSite(mux *bunrouter.Router) {
|
||||
return HTTPError{404, "page not found: " + req.URL.Path}
|
||||
})
|
||||
|
||||
g.GET("/install", func(w http.ResponseWriter, req bunrouter.Request) error {
|
||||
http.Redirect(w, req.Request, "https://gitea.elara.ws/lure/lure/raw/branch/master/scripts/install.sh", http.StatusFound)
|
||||
return nil
|
||||
})
|
||||
|
||||
g.GET("/about", func(w http.ResponseWriter, req bunrouter.Request) error {
|
||||
return ns.ExecuteTemplate(w, "about.html", nil)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user