mirror of
https://github.com/owntone/owntone-server.git
synced 2025-10-29 15:55:02 -04:00
[web] Fix call to queue method
This commit is contained in:
parent
c2460d2f5f
commit
3b336657d4
@ -7,13 +7,7 @@ const { t } = i18n.global
|
||||
const BASE_URL = './api/queue'
|
||||
|
||||
export default {
|
||||
addUri(uris, next = false) {
|
||||
return this.addToQueue({ uris }, next)
|
||||
},
|
||||
addExpression(expression, next = false) {
|
||||
return this.addToQueue({ expression }, next)
|
||||
},
|
||||
async addToQueue(params, next = false) {
|
||||
async add(params, next = false) {
|
||||
if (next) {
|
||||
const { current } = useQueueStore()
|
||||
if (current?.id) {
|
||||
@ -28,6 +22,12 @@ export default {
|
||||
})
|
||||
return data
|
||||
},
|
||||
addExpression(expression, next = false) {
|
||||
return this.add({ expression }, next)
|
||||
},
|
||||
addUri(uris, next = false) {
|
||||
return this.add({ uris }, next)
|
||||
},
|
||||
clear() {
|
||||
return api.put(`${BASE_URL}/clear`)
|
||||
},
|
||||
|
||||
@ -61,7 +61,7 @@ export default {
|
||||
add() {
|
||||
this.loading = true
|
||||
queue
|
||||
.add(this.url)
|
||||
.addUri(this.url)
|
||||
.then(() => {
|
||||
this.$emit('close')
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user