mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-24 22:06:57 +00:00
Enhance joinURL and return error on gitea client on start instead while running (#88)
Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/88
This commit is contained in:
parent
913f762eb0
commit
cc32bab31f
4 changed files with 35 additions and 17 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