Move cacheIDs
This commit is contained in:
parent
5032ecd29d
commit
9608d12cf3
2 changed files with 4 additions and 4 deletions
4
api.go
4
api.go
|
|
@ -5,15 +5,11 @@ import (
|
|||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
const bearerToken string = "AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"
|
||||
|
||||
// Global cache for user IDs
|
||||
var cacheIDs sync.Map
|
||||
|
||||
// RequestAPI get JSON from frontend API and decodes it
|
||||
func (s *Scraper) RequestAPI(req *http.Request, target interface{}) error {
|
||||
if s.guestToken == "" || s.guestCreatedAt.Before(time.Now().Add(-time.Hour*3)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue