carddav: add DELETE support to server

This commit is contained in:
Simon Ser 2020-01-22 15:16:41 +01:00
parent aa750836d4
commit 2eb6e89979
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

View File

@ -19,6 +19,7 @@ type Backend interface {
ListAddressObjects() ([]AddressObject, error)
QueryAddressObjects(query *AddressBookQuery) ([]AddressObject, error)
PutAddressObject(path string, card vcard.Card) error
DeleteAddressObject(path string) error
}
// Handler handles CardDAV HTTP requests. It can be used to create a CardDAV
@ -294,7 +295,7 @@ func (b *backend) Put(r *http.Request) error {
}
func (b *backend) Delete(r *http.Request) error {
panic("TODO")
return b.Backend.DeleteAddressObject(r.URL.Path)
}
func (b *backend) Mkcol(r *http.Request) error {