Skip to content

Commit

Permalink
Use cloudflare worker as proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
JackyKLai authored and HuakunShen committed Sep 22, 2024
1 parent 3fd5893 commit b719ddf
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions extensions/letterboxd/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,8 @@ class ExtensionTemplate extends WorkerExtension {
}

async onEnterPressedOnSearchBar(): Promise<void> {
const url = `https://api.themoviedb.org/3/search/movie?query=${encodeURIComponent(this.searchTerm)}&include_adult=false&language=en-US&page=1`;
const options = {
method: 'GET',
headers: {
accept: 'application/json',
Authorization: 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJiMDA3MWRhNzJmZDYxNmJhODFkZDBhMWYxZDdiNjk5YSIsIm5iZiI6MTcyNTc0MDQwOS4wOTg1NjcsInN1YiI6IjVlZjY2NGNlMTNhZjVmMDAzNDUzNzg1YyIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.fntcyR0fqs6lDfOTC27ZLMqlKL7b2rerJEV10IIet6c'
}
};
const searchData = await (await fetch(url, options)).json();
const url = `https://tmdb-kunkun.jackyklai.workers.dev/?search=${encodeURIComponent(this.searchTerm)}`;
const searchData = await (await fetch(url)).json();
let actions = convertActions(generalActions)
if (this.currentLetterboxdUsername) {
actions = actions.concat(convertActions(friendsActions))
Expand Down

0 comments on commit b719ddf

Please sign in to comment.