aboutsummaryrefslogtreecommitdiff
path: root/plugins/carddav/routes.go
diff options
context:
space:
mode:
authorConrad Hoffmann <ch@bitfehler.net>2022-03-01 11:04:31 +0100
committerSimon Ser <contact@emersion.fr>2022-03-01 11:17:34 +0100
commitf4523b51af0787795973b403b978ff74737a47ef (patch)
treee5310b7e91b8474f5e07d86519f66f620bf903d5 /plugins/carddav/routes.go
parent9553724c8286eea7d7e8217d5f9f1c762c9b7c82 (diff)
downloadalps-f4523b51af0787795973b403b978ff74737a47ef.tar.gz
alps-f4523b51af0787795973b403b978ff74737a47ef.zip
carddav: fix accidental shadowing of variables
The statement changed here creates new variables, whereas it means to assign values to the previously declared `ao` to be used outside of the if statement. This lead to PUT requests always being sent to a URL containing a new UUID, causing problems with some CardDAV servers.
Diffstat (limited to 'plugins/carddav/routes.go')
-rw-r--r--plugins/carddav/routes.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/carddav/routes.go b/plugins/carddav/routes.go
index fe7c37d..6c8a85f 100644
--- a/plugins/carddav/routes.go
+++ b/plugins/carddav/routes.go
@@ -141,7 +141,7 @@ func registerRoutes(p *plugin) {
var ao *carddav.AddressObject
var card vcard.Card
if addressObjectPath != "" {
- ao, err := c.GetAddressObject(addressObjectPath)
+ ao, err = c.GetAddressObject(addressObjectPath)
if err != nil {
return fmt.Errorf("failed to query CardDAV address: %v", err)
}