13 lines
243 B
JavaScript
13 lines
243 B
JavaScript
import buildUrl from 'build-url'
|
|
|
|
export default async function(path, queryParams) {
|
|
const { $axios, $config } = this.context
|
|
|
|
const url = buildUrl($config.serverBaseUrl, {
|
|
path,
|
|
queryParams,
|
|
})
|
|
|
|
return await $axios.get(url)
|
|
}
|