ricellis commented on issue #2666: soft-deletion for database
URL: https://github.com/apache/couchdb/pull/2666#issuecomment-608532116
 
 
   OK, so now the `POST` can only do an undelete couldn't the body just be:
   ```
   {
   "source_timestamp": "2020-04-01T07:13:42Z",
   "source": "db01",
   }
   ```
   That also removes the awkward naming around `undelete` that I know was 
bothering some people.
   
   Also given
   `DELETE /_deleted_dbs/{dbName}`
   shouldn't we also
   `POST /_deleted_dbs/{dbName}`
   since they are operating on the same resource?
   
   Then the body would be just (or also with an optional `target`):
   ```
   {
   "source_timestamp": "2020-04-01T07:13:42Z"
   }
   ```
   
   Although I think the parameter name in the body should match that used on 
the `DELETE` request as well; either both `timestamp` or both 
`source_timestamp`.
   
   It seems like it would be nice to use paths consistently throughout as 
[@mikerhodes 
proposed](https://gist.github.com/mikerhodes/39c66576eee468a5aeaa23c5715aec9a), 
but I can see the rationale for preferring to use `key=dbname` to be consistent 
with the view-like APIs.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to