mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 16:24:14 +00:00
carddav: add DELETE support to server
This commit is contained in:
parent
aa750836d4
commit
2eb6e89979
@ -19,6 +19,7 @@ type Backend interface {
|
|||||||
ListAddressObjects() ([]AddressObject, error)
|
ListAddressObjects() ([]AddressObject, error)
|
||||||
QueryAddressObjects(query *AddressBookQuery) ([]AddressObject, error)
|
QueryAddressObjects(query *AddressBookQuery) ([]AddressObject, error)
|
||||||
PutAddressObject(path string, card vcard.Card) 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
|
// 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 {
|
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 {
|
func (b *backend) Mkcol(r *http.Request) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user