Release 2.0.10 (#3927)
* allow API calls via GET * allow to stop timesheet via GET * improve form handling and validation * improve stop button handling * bump version
This commit is contained in:
@@ -85,20 +85,20 @@ export default class KimaiAPILink extends KimaiPlugin {
|
||||
API.handleError(message, error);
|
||||
};
|
||||
|
||||
let data = {};
|
||||
if (attributes['payload'] !== undefined) {
|
||||
data = attributes['payload'];
|
||||
}
|
||||
|
||||
if (method === 'PATCH') {
|
||||
let data = {};
|
||||
if (attributes['payload'] !== undefined) {
|
||||
data = attributes['payload'];
|
||||
}
|
||||
API.patch(url, data, successHandle, errorHandle);
|
||||
} else if (method === 'POST') {
|
||||
let data = {};
|
||||
if (attributes['payload'] !== undefined) {
|
||||
data = attributes['payload'];
|
||||
}
|
||||
API.post(url, data, successHandle, errorHandle);
|
||||
} else if (method === 'DELETE') {
|
||||
API.delete(url, successHandle, errorHandle);
|
||||
} else if (method === 'GET') {
|
||||
API.get(url, data, successHandle, errorHandle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user