Removed unneeded mixin

This commit is contained in:
Kieran Eglin 2023-12-01 15:19:50 -08:00
parent 88078ff813
commit 9350c5513e
No known key found for this signature in database
GPG Key ID: 193984967FCF432D
2 changed files with 4 additions and 18 deletions

View File

@ -65,10 +65,8 @@
<script>
import Path from 'path'
import apiRequestHelpers from '@/mixins/apiRequestHelpers'
export default {
mixins: [apiRequestHelpers],
props: {
item: {
type: Object,
@ -137,7 +135,7 @@ export default {
this.error = ''
try {
const searchQueryString = this.buildQuerystring({
const searchQueryString = new URLSearchParams({
title: this.itemData.title,
author: this.itemData.author,
provider: this.provider
@ -147,9 +145,9 @@ export default {
if (bestCandidate) {
this.itemData = {
...this.itemData,
title: bestCandidate?.title,
author: bestCandidate?.author,
series: (bestCandidate?.series || [])[0]?.series
title: bestCandidate.title,
author: bestCandidate.author,
series: (bestCandidate.series || [])[0]?.series
}
} else {
this.error = this.$strings.ErrorUploadFetchMetadataNoResults

View File

@ -1,12 +0,0 @@
export default {
methods: {
buildQuerystring(obj, opts = { includePrefix: false }) {
let querystring = Object
.entries(obj)
.map(([key, val]) => `${encodeURIComponent(key)}=${encodeURIComponent(val)}`)
.join('&')
return (opts.includePrefix ? '?' : '').concat(querystring)
}
}
}