Skip to content

Commit

Permalink
fix login bug
Browse files Browse the repository at this point in the history
  • Loading branch information
thftgr authored Sep 10, 2024
1 parent 41dae4a commit 38f1274
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions banchoCrawler/osuApi.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (
"net/http"
"strings"
"time"
"github.com/pkg/errors"
"fmt"
)

type banchoJWT struct {
Expand Down Expand Up @@ -144,5 +146,8 @@ func login(refresh bool) (err error) {
return
}

if res.StatusCode != 200 {
return errors.New(fmt.Sprint(res.StatusCode, string(body)))
}
return json.Unmarshal(body, &config.Config.Osu.Token)
}

0 comments on commit 38f1274

Please sign in to comment.