You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2022/05/17 15:31:56 UTC

[GitHub] [james-project] chibenwa commented on pull request #1004: James 3758 Endpoint to delete old emails from INBOXes

chibenwa commented on PR #1004:
URL: https://github.com/apache/james-project/pull/1004#issuecomment-1129016609

   As a first feedback the API could be maybe improved...
   
   As a common practice we tend in the project to lean toward `DELETE` verb when deleting stuff, even when such deletion is done as a task. Maybe we could stick to this convention here too.
   
   The entity that we delete are messages, not mailboxes. I would say that the fact that we iterate on mailboxes to actually delete messages is an implementation detail that maybe should not leak to the API.
   
   Finally I am unhappy with the `task` name. I could hardly find a meaningfull task name. `cleanup` maybe. Or the concept of `retention` or `purge`. But maybe not even needing to name it would be better.
   
   I think `DELETE /messages?olderThan=30days` / `DELETE /messages?usingExpiresHeader` might be cleaner.
   
   `BlobRoutes` shows a related exemple of how to set up such a DELETE route without requiring `task` parameter.
   
   For a deeper look, I will need to put together a review of this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org