mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
fix error, if there is no old vacation specifying a number of days, setting now same default as UI: 3 days
also some docu fixes
This commit is contained in:
parent
c5e4af397a
commit
6249f128db
@ -154,7 +154,7 @@ The content of the POST request is a JSON encoded object with following attribut
|
||||
|
||||
```
|
||||
curl -i https://example.org/egroupware/groupdav.php/mail/vacation --user <user> -X POST -H 'Content-Type: application/json' \
|
||||
--data-binary '{"message":"I'm away from $$start$$ to $$end$$, will respond when I'm back.","start":"2023-01-01","end":"2023-01-10"}'
|
||||
--data-binary '{"text":"I'm away from $$start$$ to $$end$$, will respond when I'm back.","start":"2023-01-01","end":"2023-01-10"}'
|
||||
|
||||
HTTP/1.1 200 Ok
|
||||
|
||||
|
@ -31,7 +31,7 @@ One can use the following URLs relative (!) to https://example.org/egroupware/gr
|
||||
- ```/infolog/``` infologs of current user
|
||||
- ```/(resources|locations)/<resource-name>/calendar``` calendar of a resource/location, if user has rights to view
|
||||
- ```/<current-username>/(resource|location)-<resource-name>``` shared calendar from a resource/location
|
||||
- ```/mail/``` only REST API, currently only send EMail or launch interactive compose windows
|
||||
- ```/mail/``` REST API only
|
||||
|
||||
Shared addressbooks or calendars are only shown in the users home-set, if he subscribed to it via his CalDAV preferences!
|
||||
|
||||
@ -41,7 +41,10 @@ from the data of an ```allprop``` PROPFIND, allow browsing CalDAV/CardDAV tree w
|
||||
## REST API: using EGroupware CalDAV/CardDAV server with JSON
|
||||
- [Addressbook](Addressbook.md)
|
||||
- [Calendar](Calendar.md) (currently recurring events are readonly, they are returned but can not be created or modified)
|
||||
- [Mail](Mail.md) (currently only sending mails or opening interactive compose windows)
|
||||
- [Mail](Mail.md) (currently only sending mails, opening interactive compose windows and vacation handling)
|
||||
|
||||
> For the REST API you always have to send an "Accept: application/json" header and for POST & PUT requests additionally
|
||||
> a "Content-Type: application/json" header, otherwise you talk to the CalDAV/CardDAV server and don't get the response you expect!
|
||||
|
||||
Following RFCs / drafts used/planned for JSON encoding of resources
|
||||
* [draft-ietf-jmap-jscontact: JSContact: A JSON Representation of Contact Data](https://datatracker.ietf.org/doc/html/draft-ietf-jmap-jscontact)
|
||||
|
@ -190,7 +190,7 @@ class ApiHandler extends Api\CalDAV\Handler
|
||||
}
|
||||
$vacation_rule = null;
|
||||
$sieve = new Api\Mail\Sieve($account->imapServer());
|
||||
$sieve->setVacation(array_merge($vacation, $update), null, $vacation_rule, true);
|
||||
$sieve->setVacation(array_merge(['days' => 3], $vacation, $update), null, $vacation_rule, true);
|
||||
echo json_encode([
|
||||
'status' => 200,
|
||||
'message' => 'Vacation handling updated',
|
||||
|
Loading…
Reference in New Issue
Block a user