mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-25 06:16:58 +00:00
enhance joinURL and return error on gitea client on start instead while running
This commit is contained in:
parent
35b35c5d67
commit
1596ab9764
4 changed files with 23 additions and 18 deletions
|
@ -82,7 +82,10 @@ func Serve(ctx *cli.Context) error {
|
|||
// TODO: make this an MRU cache with a size limit
|
||||
fileResponseCache := cache.NewKeyValueCache()
|
||||
|
||||
giteaClient := gitea.NewClient(giteaRoot, giteaAPIToken)
|
||||
giteaClient, err := gitea.NewClient(giteaRoot, giteaAPIToken)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not create new gitea client: %v", err)
|
||||
}
|
||||
|
||||
// Create handler based on settings
|
||||
handler := server.Handler(mainDomainSuffix, []byte(rawDomain),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue