bugfix for API selects (#780)

This commit is contained in:
Kevin Papst
2019-05-12 17:22:24 +02:00
committed by GitHub
parent 5c227888f2
commit 392f8239f5
15 changed files with 1667 additions and 1118 deletions

View File

@@ -59,7 +59,7 @@ export default class KimaiAPILink extends KimaiClickHandlerReducedInTableRow {
{
const method = attributes['method'];
const eventName = attributes['event'];
const api = this.getContainer().getPlugin('api');
const API = this.getContainer().getPlugin('api');
const eventing = this.getContainer().getPlugin('event');
const alert = this.getContainer().getPlugin('alert');
const successHandle = function(result) {
@@ -80,9 +80,9 @@ export default class KimaiAPILink extends KimaiClickHandlerReducedInTableRow {
};
if (method === 'PATCH') {
api.patch(url, successHandle, errorHandle);
API.patch(url, {}, successHandle, errorHandle);
} else if (method === 'DELETE') {
api.delete(url, successHandle, errorHandle);
API.delete(url, successHandle, errorHandle);
}
}