Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISSUE-1511 Fix downloadAll endpoint in session capability #1514

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and delivered to the user in a zip file.
Servers supporting the JMAP Download All extension need to advertise it through the session capabilities:
....
"com:linagora:params:downloadAll": {
"endpoint":"http://localhost/jmap/downloadAll/{accountId}/{emailId}?name={name}",
"endpoint":"http://localhost/downloadAll/{accountId}/{emailId}?name={name}",
}
....

Expand All @@ -25,7 +25,7 @@ It must contain the following variables detailed in the specification section:
The JMAP Download All extension is defined by a new JMAP route following this pattern:

....
GET /jmap/downloadAll/{accountId}/{emailId}?name={name}
GET /downloadAll/{accountId}/{emailId}?name={name}
....

Where:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,5 +387,5 @@ trait DownloadAllContract {
.statusCode(SC_OK)
.contentType(JSON)
.body("capabilities", hasKey("com:linagora:params:downloadAll"))
.body("capabilities.'com:linagora:params:downloadAll'.endpoint", equalTo("http://localhost/jmap/downloadAll/{accountId}/{emailId}?name={name}"))
.body("capabilities.'com:linagora:params:downloadAll'.endpoint", equalTo("http://localhost/downloadAll/{accountId}/{emailId}?name={name}"))
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class DownloadAllCapabilityFactory @Inject() extends CapabilityFactory {
override def id(): CapabilityIdentifier = LINAGORA_DOWNLOAD_ALL

override def create(urlPrefixes: UrlPrefixes): Capability =
DownloadAllCapability(DownloadAllCapabilityProperties(URL(urlPrefixes.httpUrlPrefix.toString + "/jmap/downloadAll/{accountId}/{emailId}?name={name}")))
DownloadAllCapability(DownloadAllCapabilityProperties(URL(urlPrefixes.httpUrlPrefix.toString + "/downloadAll/{accountId}/{emailId}?name={name}")))
}

class DownloadAllRoutesModule extends AbstractModule {
Expand Down