mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-12 13:34:24 +02:00
Added error handling; Made querystring helper
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user