fix auth
All checks were successful
/ build (push) Successful in 1m4s

This commit is contained in:
Astra 2025-09-29 10:31:07 +01:00
parent 69b715f4ee
commit 958b6ccb7a

View file

@ -105,10 +105,10 @@ func (b *BSky) GetPDS(handle string) string {
func (b *BSky) Auth(authData []string) error { func (b *BSky) Auth(authData []string) error {
b.Bluesky.Cfg.Handle = authData[0] b.Bluesky.Cfg.Handle = authData[0]
b.getPDS() b.getPDS()
auth, err := loadAuth() auth, _ := loadAuth()
if auth.AccessJWT == "" { // no auth session found if auth == nil || auth.AccessJWT == "" { // no auth session found
b.Bluesky.Cfg.AppPassword = authData[1] b.Bluesky.Cfg.AppPassword = authData[1]
err = b.Bluesky.CreateSession(b.Bluesky.Cfg) err := b.Bluesky.CreateSession(b.Bluesky.Cfg)
if err != nil { if err != nil {
return fmt.Errorf("unable to auth: %s", err) return fmt.Errorf("unable to auth: %s", err)
} }