aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-12-20 21:14:03 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-12-20 21:14:03 +0100
commit6839b39f54ca27fec1acdebbc8f1c36a715a8ae9 (patch)
tree69609e1bb9b008eddbe4cf4410a5d47772ffac87 /client.go
parent442b0b50caafaed87047556dd312928e0605ba37 (diff)
Simplify
Diffstat (limited to 'client.go')
-rw-r--r--client.go15
1 files changed, 4 insertions, 11 deletions
diff --git a/client.go b/client.go
index c67c1c8..12812dd 100644
--- a/client.go
+++ b/client.go
@@ -159,11 +159,7 @@ func (c *Client) Register(a *Account) (*Registration, error) {
Contact: a.Contact,
}
c.Location = c.Dir.NewReg
- err := c.post(a, r)
- if err, ok := err.(Problem); ok {
- log.Println("REGISTER", err.Err, err)
- }
- return r, err
+ return r, c.post(a, r)
}
// Agree to TOS
@@ -173,14 +169,12 @@ func (c *Client) Agree(a *Account) (*Registration, error) {
Contact: a.Contact,
Agreement: c.Link["terms-of-service"],
}
- err := c.post(a, r)
- return r, err
+ return r, c.post(a, r)
}
func (c *Client) Query(a *Account) (*Registration, error) {
r := &Registration{Resource: ResRegister}
- err := c.post(a, r)
- return r, err
+ return r, c.post(a, r)
}
func (c *Client) Authorize(a *Account, domain string) (*Authorization, error) {
@@ -192,8 +186,7 @@ func (c *Client) Authorize(a *Account, domain string) (*Authorization, error) {
},
}
c.Location = c.Dir.NewAuthz
- err := c.post(a, r)
- return r, err
+ return r, c.post(a, r)
}
func (c Client) String() string {