From a3d47c41d1e968c0a53bbc90f11c9c9c5dac92e0 Mon Sep 17 00:00:00 2001 From: Piotr Zduniak Date: Thu, 15 Jan 2015 18:46:47 +0100 Subject: [PATCH 1/2] title to subject in emails creation request struct --- routes/emails.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/emails.go b/routes/emails.go index cc70f62..2ef773b 100644 --- a/routes/emails.go +++ b/routes/emails.go @@ -126,7 +126,7 @@ type EmailsCreateRequest struct { BCC []string `json:"bcc"` ReplyTo string `json:"reply_to"` ThreadID string `json:"thread_id"` - Subject string `json:"title"` + Subject string `json:"subject"` Body string `json:"body"` BodyVersionMajor int `json:"body_version_major"` BodyVersionMinor int `json:"body_version_minor"` From 01f59a18aba6f22746b61f86a5ed018670a52516 Mon Sep 17 00:00:00 2001 From: Piotr Zduniak Date: Thu, 15 Jan 2015 18:53:12 +0100 Subject: [PATCH 2/2] git y u do dis --- routes/accounts.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/routes/accounts.go b/routes/accounts.go index 84c73c0..13a1da7 100644 --- a/routes/accounts.go +++ b/routes/accounts.go @@ -566,11 +566,11 @@ func AccountsUpdate(c web.C, w http.ResponseWriter, r *http.Request) { user.Settings = input.Settings } - if input.PublicKey !+ "" { - key, err:= env.Keys.FindByFingerprint(input.PublicKey) + if input.PublicKey != "" { + key, err := env.Keys.FindByFingerprint(input.PublicKey) if err != nil { env.Log.WithFields(logrus.Fields{ - "error": err.Error(), + "error": err.Error(), "fingerprint": input.PublicKey, }).Error("Unable to find a key") @@ -583,8 +583,8 @@ func AccountsUpdate(c web.C, w http.ResponseWriter, r *http.Request) { if key.Owner != user.ID { env.Log.WithFields(logrus.Fields{ - "user_id:": user.ID, - "owner": key.Owner, + "user_id:": user.ID, + "owner": key.Owner, "fingerprint": input.PublicKey, }).Error("Unable to find a key") @@ -592,7 +592,7 @@ func AccountsUpdate(c web.C, w http.ResponseWriter, r *http.Request) { Success: false, Message: "Invalid public key", }) - return + return } user.PGPKey = input.PublicKey