mirror of
https://github.com/cranci1/Sora.git
synced 2026-03-11 17:45:37 +00:00
Update TMDB-Trending.swift
This commit is contained in:
parent
e1cad2548e
commit
116e0295a7
1 changed files with 2 additions and 1 deletions
|
|
@ -52,10 +52,11 @@ class TMBDTrending {
|
|||
request.timeoutInterval = 10
|
||||
request.allHTTPHeaderFields = [
|
||||
"accept": "application/json",
|
||||
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
|
||||
"Authorization": "Bearer \(TMBDRequest.decryptToken())"
|
||||
]
|
||||
|
||||
let (data, _) = try await URLSession.custom.data(for: request)
|
||||
let (data, _) = try await URLSession.shared.data(for: request)
|
||||
let response = try JSONDecoder().decode(TMDBResponse.self, from: data)
|
||||
return response.results
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue