carddav: pass pointer in CreateAddressBook

The struct is a bit too large to pass by value.
This commit is contained in:
Simon Ser 2024-02-07 17:24:04 +01:00
parent f1d56f2437
commit fbcd08d64a
2 changed files with 3 additions and 3 deletions

View File

@ -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")
}

View File

@ -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) {