Skip to content

Commit dcd7d97

Browse files
committed
fix linty
1 parent 08d9b9f commit dcd7d97

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

src/views/ScoresheetMarks.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function goBack () {
1414
}
1515
1616
onMounted(async () => {
17-
await scsh.open(route.params.system as string, ...route.params.vendor)
17+
await scsh.open(route.params.system as string, ...route.params.vendor as string[])
1818
})
1919
2020
watch(() => route.params, async (next, prev) => {
@@ -28,7 +28,7 @@ watch(() => route.params, async (next, prev) => {
2828
}
2929
if (next.system && next.vendor) {
3030
await scsh.close()
31-
await scsh.open(next.system as string, ...next.vendor)
31+
await scsh.open(next.system as string, ...next.vendor as string[])
3232
}
3333
})
3434

src/views/ScoresheetsList.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { computedAsync } from '@vueuse/core'
33
import ScoreButton from '../components/ScoreButton.vue'
44
import { useRouter } from 'vue-router'
5-
import { listScoresheets, isServoIntermediateScoresheet, isRemoteTallyScoresheet, isRemoteMarkScoresheet, type Scoresheet } from '../hooks/scoresheet'
5+
import { listScoresheets, isServoIntermediateScoresheet, isRemoteTallyScoresheet, isRemoteMarkScoresheet, type Scoresheet, type LocalScoresheet } from '../hooks/scoresheet'
66
import { formatDate } from '../helpers'
77
import JournalTally from '../components/JournalTally.vue'
88
@@ -82,7 +82,7 @@ function scoresheetLink (scoresheet: Scoresheet<string>) {
8282
Judge Type: <span class="font-bold">{{ scoresheet.judgeType }}</span>
8383
</div>
8484
</div>
85-
<journal-tally :tally="scoresheet.tally" />
85+
<journal-tally :tally="(scoresheet as LocalScoresheet<string>).tally" />
8686
<div class="grid grid-cols-2 grid-rows-1">
8787
<router-link
8888
:to="`/score/${scoresheetLink(scoresheet)}`"

src/views/servo/Entries.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,15 @@ const { data, error, isFetching, execute: refetch } = useFetch(url, {
3131
return
3232
}
3333
34-
options.headers = {
35-
...options.headers,
36-
authorization: `Bearer ${token.value}`
34+
if (Array.isArray(options.headers)) {
35+
options.headers = [...options.headers, ['authorization', `Bearer ${token.value}`]]
36+
} else if (options.headers instanceof Headers) {
37+
options.headers.append('authorization', `Bearer ${token.value}`)
38+
} else {
39+
options.headers = {
40+
...options.headers,
41+
authorization: `Bearer ${token.value}`
42+
}
3743
}
3844
3945
return { options }

0 commit comments

Comments
 (0)