Skip to content

Commit

Permalink
fix linty
Browse files Browse the repository at this point in the history
  • Loading branch information
swantzter committed Feb 5, 2025
1 parent 08d9b9f commit dcd7d97
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/views/ScoresheetMarks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function goBack () {
}
onMounted(async () => {
await scsh.open(route.params.system as string, ...route.params.vendor)
await scsh.open(route.params.system as string, ...route.params.vendor as string[])
})
watch(() => route.params, async (next, prev) => {
Expand All @@ -28,7 +28,7 @@ watch(() => route.params, async (next, prev) => {
}
if (next.system && next.vendor) {
await scsh.close()
await scsh.open(next.system as string, ...next.vendor)
await scsh.open(next.system as string, ...next.vendor as string[])
}
})
Expand Down
4 changes: 2 additions & 2 deletions src/views/ScoresheetsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { computedAsync } from '@vueuse/core'
import ScoreButton from '../components/ScoreButton.vue'
import { useRouter } from 'vue-router'
import { listScoresheets, isServoIntermediateScoresheet, isRemoteTallyScoresheet, isRemoteMarkScoresheet, type Scoresheet } from '../hooks/scoresheet'
import { listScoresheets, isServoIntermediateScoresheet, isRemoteTallyScoresheet, isRemoteMarkScoresheet, type Scoresheet, type LocalScoresheet } from '../hooks/scoresheet'
import { formatDate } from '../helpers'
import JournalTally from '../components/JournalTally.vue'
Expand Down Expand Up @@ -82,7 +82,7 @@ function scoresheetLink (scoresheet: Scoresheet<string>) {
Judge Type: <span class="font-bold">{{ scoresheet.judgeType }}</span>
</div>
</div>
<journal-tally :tally="scoresheet.tally" />
<journal-tally :tally="(scoresheet as LocalScoresheet<string>).tally" />
<div class="grid grid-cols-2 grid-rows-1">
<router-link
:to="`/score/${scoresheetLink(scoresheet)}`"
Expand Down
12 changes: 9 additions & 3 deletions src/views/servo/Entries.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ const { data, error, isFetching, execute: refetch } = useFetch(url, {
return
}
options.headers = {
...options.headers,
authorization: `Bearer ${token.value}`
if (Array.isArray(options.headers)) {
options.headers = [...options.headers, ['authorization', `Bearer ${token.value}`]]
} else if (options.headers instanceof Headers) {
options.headers.append('authorization', `Bearer ${token.value}`)
} else {
options.headers = {
...options.headers,
authorization: `Bearer ${token.value}`
}
}
return { options }
Expand Down

0 comments on commit dcd7d97

Please sign in to comment.