Commit 29883a70 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Fixed minimized method name in API dialogs. #719

parent fbd66d32
......@@ -241,22 +241,22 @@ class Api {
async get(path, query, config) {
const GET = (path, body, config) => this.axios.get(path, config)
return this.doHttpRequest(GET, path, null, {params: query, ...config})
return this.doHttpRequest(GET, path, null, {params: query, methodName: 'GET', ...config})
}
async post(path, body, config) {
const POST = (path, body, config) => this.axios.post(path, body, config)
return this.doHttpRequest(POST, path, body, config)
return this.doHttpRequest(POST, path, body, {methodName: 'POST', ...config})
}
async put(path, body, config) {
const PUT = (path, body, config) => this.axios.put(path, body, config)
return this.doHttpRequest(PUT, path, body, config)
return this.doHttpRequest(PUT, path, body, {methodName: 'PUT', ...config})
}
async delete(path, config) {
const DELETE = (path, body, config) => this.axios.delete(path, config)
return this.doHttpRequest(DELETE, path, null, config)
return this.doHttpRequest(DELETE, path, null, {methodName: 'DELETE', ...config})
}
async doHttpRequest(method, path, body, config) {
......@@ -278,7 +278,7 @@ class Api {
}
if (config.returnRequest) {
return {
method: method.name,
method: config.methodName || method.name,
url: `${this.baseURL}${path}`,
body: body,
response: results.data
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment