linagora / tmail-backend

GNU Affero General Public License v3.0
39 stars 21 forks source link

[PublicAsset] PublicAsset/set destroy JMAP method #1049

Closed Arsnael closed 4 months ago

Arsnael commented 4 months ago

A classic /set destroy method for PublicAsset

Request:

{
  "using": ["urn:ietf:params:jmap:core", "com:linagora:params:public:assets"],
  "methodCalls": [
    [
      "PublicAsset/set", {
        "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
        "destroy": ["1234"]
      }, "0"
    ]
  ]
}

Response:

{
  "sessionState": "2c9f1b12-b35a-43e6-9af2-0106fb53a943",
  "methodResponses": [
    ["PublicAsset/set", {
      "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
      "newState": "2c9f1b12-b35a-43e6-9af2-0106fb53a943",
      "destroyed": ["1234"]
    }, "0"]
  ]
}

DoD: integration tests

Arsnael commented 4 months ago

It should destroy the blob as well from object storage

vttranlina commented 4 months ago

pr: https://github.com/linagora/tmail-backend/pull/1066