mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-07-13 17:12:05 -04:00
groupware: refactor responses to a jmap.Response object
* in the JMAP API as well as in several places in the Groupware framework, use a single jmap.Response[T] object to return the payload, the language, the session state and the etag/state instead of individual multi-valued return values
This commit is contained in:
@@ -27,7 +27,7 @@ func (j *Client) GetObjects(accountId string, //NOSONAR
|
||||
quotaIds []string, identityIds []string,
|
||||
emailSubmissionIds []string,
|
||||
ctx Context,
|
||||
) (Objects, SessionState, State, Language, Error) {
|
||||
) (Result[Objects], Error) {
|
||||
l := j.logger("GetObjects", ctx).With()
|
||||
if len(mailboxIds) > 0 {
|
||||
l = l.Array("mailboxIds", log.SafeStringArray(mailboxIds))
|
||||
@@ -90,7 +90,7 @@ func (j *Client) GetObjects(accountId string, //NOSONAR
|
||||
|
||||
cmd, err := j.request(ctx, NS_OBJECTS, methodCalls...)
|
||||
if err != nil {
|
||||
return Objects{}, "", "", "", err
|
||||
return ZeroResult[Objects](), err
|
||||
}
|
||||
|
||||
return command(j, ctx, cmd, func(body *Response) (Objects, State, Error) {
|
||||
|
||||
Reference in New Issue
Block a user