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