Skip to content

Commit

Permalink
Style: whitespace cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
mateussouzaweb committed Feb 10, 2024
1 parent fdb7141 commit 85a017c
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions src/scripts/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const request = async (method: string, endpoint: string, body: any, headers: Hea
}

const result = await fetch(url, requestOptions)

if( result.status === 204 ){
return {} as Result
}
Expand All @@ -85,7 +85,7 @@ const makeLogin = async (username: string, password: string) => {
scope: 'offline_access',
})


const headers = new Headers()
headers.append('Content-Type', 'application/x-www-form-urlencoded')
headers.append('Authorization', 'Basic ' + authToken);
Expand Down Expand Up @@ -314,7 +314,7 @@ const watchlist = async (accessToken: string, accountId: string, filters: Data)
* @returns
*/
const inWatchlist = async (accessToken: string, accountId: string, filters: Data) => {

var headers = new Headers()
headers.append('Authorization', 'Bearer ' + accessToken)
headers.append('Content-Type', 'application/x-www-form-urlencoded')
Expand Down
10 changes: 5 additions & 5 deletions src/scripts/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ const getTemplate = async (name: string, data: any) => {

/**
* Retrieve image information
* @param images
* @returns
* @param images
* @returns
*/
const getImage = (images: any[]) => {

const image = { source: '' }
if( images && images.length ){
image.source = images[0][0].source
}

return image
}

Expand Down Expand Up @@ -589,7 +589,7 @@ const setProgress = async (filters: Data, data: Data) => {
* @returns
*/
const serie = async (serieId: string, filters: Data) => {

await refreshSession()

const accessToken = localStorage.getItem('accessToken')
Expand Down Expand Up @@ -686,7 +686,7 @@ const episode = async (episodeId: string, filters: Data) => {
const accessToken = localStorage.getItem('accessToken')
const preferredContentAudioLanguage = localStorage.getItem('preferredContentAudioLanguage')
const preferredCommunicationLanguage = localStorage.getItem('preferredCommunicationLanguage')

filters['preferred_audio_language'] = preferredContentAudioLanguage
filters['locale'] = preferredCommunicationLanguage

Expand Down
6 changes: 3 additions & 3 deletions src/scripts/explore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ const listResults: Callback = async ({ state, render }) => {

let total = 0
let items = []

// Special listings
if ( category && special ){
const response = await App.browser({
'type': 'series',
'sort_by': sort,
'start': offset.toString(),
'start': offset.toString(),
'n': limit.toString()
})

Expand All @@ -118,7 +118,7 @@ const listResults: Callback = async ({ state, render }) => {
'type': 'series',
'categories': category,
'sort_by': sort,
'start': offset.toString(),
'start': offset.toString(),
'n': limit.toString()
})

Expand Down
2 changes: 1 addition & 1 deletion src/scripts/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const listHistory: Callback = async ({ state, render }) => {
})

} catch (error) {

await render({
loaded: true,
error: true,
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const makeLogin: Callback = async ({ element, render }) => {
await App.login(username.value, password.value)
Route.redirect('/home')
} catch (error) {
await render({
message: error.message
await render({
message: error.message
})
}

Expand Down
8 changes: 4 additions & 4 deletions src/scripts/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ const listResults: Callback = async ({ state, render }) => {
const response = await App.search({
'type': 'series',
'q': query,
'start': offset.toString(),
'start': offset.toString(),
'n': limit.toString()
})

const data = {
count: 0,
items: []
const data = {
count: 0,
items: []
}

if( response.data && response.data.length ){
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/serie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ const listEpisodes: Callback = async ({ state, render }) => {
})

} catch (error) {

await render({
loaded: true,
error: true,
Expand All @@ -232,7 +232,7 @@ const onMount: Callback = async (component) => {
const serieId = component.state.serieId
Route.redirect('/serie/' + serieId + '/season/' + target.value)
})

on(element, 'change', 'input#sort', (_event, target: HTMLInputElement) => {
const serieId = component.state.serieId
const seasonId = component.state.seasonId
Expand Down

0 comments on commit 85a017c

Please sign in to comment.