Skip to content

Commit f9a820b

Browse files
committed
chore: minor improvements
1 parent 42df364 commit f9a820b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

leetcode/credential.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func NewCookiesAuth(session, csrftoken, cfClearance string) CredentialsProvider
5454
}
5555

5656
func (c *cookiesAuth) AddCredentials(req *http.Request) error {
57-
if c.LeetCodeSession == "" || c.CsrfToken == "" {
57+
if !c.hasAuth() {
5858
return errors.New("cookies not found")
5959
}
6060
req.AddCookie(&http.Cookie{Name: "LEETCODE_SESSION", Value: c.LeetCodeSession})

0 commit comments

Comments
 (0)