Fix user agent using hardcoded 1.0 version.

This commit is contained in:
Aidan Holm
2024-10-26 18:56:26 +08:00
parent 0cef51c6ac
commit e81c076dbc
8 changed files with 38 additions and 29 deletions

View File

@@ -13,6 +13,7 @@ import (
"github.com/nkanaev/yarr/src/platform"
"github.com/nkanaev/yarr/src/server"
"github.com/nkanaev/yarr/src/storage"
"github.com/nkanaev/yarr/src/worker"
)
var Version string = "0.0"
@@ -131,7 +132,8 @@ func main() {
log.Fatal("Failed to initialise database: ", err)
}
srv := server.NewServer(store, addr)
client := worker.NewClient(Version)
srv := server.NewServer(store, addr, client)
if basepath != "" {
srv.BasePath = "/" + strings.Trim(basepath, "/")