added tags for timesheets (#604)

This commit is contained in:
Mathias
2019-05-12 01:40:04 +02:00
committed by Kevin Papst
parent f31118292c
commit e29e183e84
84 changed files with 2132 additions and 158 deletions

View File

@@ -18,7 +18,7 @@ export default class KimaiAPI extends KimaiPlugin {
return 'api';
}
get(url, callback) {
get(url, data, callback) {
jQuery.ajax({
url: url,
headers: {
@@ -26,6 +26,7 @@ export default class KimaiAPI extends KimaiPlugin {
'Content-Type':'application/json'
},
method: 'GET',
data: data,
dataType: 'json',
success: callback
});
@@ -45,4 +46,18 @@ export default class KimaiAPI extends KimaiPlugin {
});
}
delete(url, callbackSuccess, callbackError) {
jQuery.ajax({
url: url,
headers: {
'X-AUTH-SESSION': true,
'Content-Type':'application/json'
},
method: 'DELETE',
dataType: 'json',
success: callbackSuccess,
error: callbackError
});
}
}