diff --git a/carddav/carddav_test.go b/carddav/carddav_test.go index b4914c3..337ac83 100644 --- a/carddav/carddav_test.go +++ b/carddav/carddav_test.go @@ -68,7 +68,7 @@ func (b *testBackend) GetAddressBook(ctx context.Context, path string) (*Address return nil, webdav.NewHTTPError(404, fmt.Errorf("Not found")) } -func (*testBackend) CreateAddressBook(ctx context.Context, ab AddressBook) error { +func (*testBackend) CreateAddressBook(ctx context.Context, ab *AddressBook) error { panic("TODO: implement") } diff --git a/carddav/server.go b/carddav/server.go index 5e0b259..bd893f4 100644 --- a/carddav/server.go +++ b/carddav/server.go @@ -30,7 +30,7 @@ type Backend interface { AddressBookHomeSetPath(ctx context.Context) (string, error) ListAddressBooks(ctx context.Context) ([]AddressBook, error) GetAddressBook(ctx context.Context, path string) (*AddressBook, error) - CreateAddressBook(ctx context.Context, addressBook AddressBook) error + CreateAddressBook(ctx context.Context, addressBook *AddressBook) error DeleteAddressBook(ctx context.Context, path string) error GetAddressObject(ctx context.Context, path string, req *AddressDataRequest) (*AddressObject, error) ListAddressObjects(ctx context.Context, path string, req *AddressDataRequest) ([]AddressObject, error) @@ -716,7 +716,7 @@ func (b *backend) Mkcol(r *http.Request) error { // TODO ... } - return b.Backend.CreateAddressBook(r.Context(), ab) + return b.Backend.CreateAddressBook(r.Context(), &ab) } func (b *backend) Copy(r *http.Request, dest *internal.Href, recursive, overwrite bool) (created bool, err error) {