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:
Kevin Papst
2023-03-15 23:02:28 +01:00
committed by GitHub
parent 1a8c78944a
commit f007697a73
15 changed files with 34 additions and 99 deletions

View File

@@ -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);
}
}