diff options
Diffstat (limited to 'plugins/base/routes.go')
-rw-r--r-- | plugins/base/routes.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/base/routes.go b/plugins/base/routes.go index 2d4cb8c..a389495 100644 --- a/plugins/base/routes.go +++ b/plugins/base/routes.go @@ -111,7 +111,9 @@ func handleGetMailbox(ctx *alps.Context) error { if err != nil { return err } - mbox = &MailboxStatus{c.Mailbox()} + if mbox, err = getMailboxStatus(c, mboxName); err != nil { + return err + } return nil }) if err != nil { @@ -213,7 +215,9 @@ func handleGetPart(ctx *alps.Context, raw bool) error { if msg, part, err = getMessagePart(c, mboxName, uid, partPath); err != nil { return err } - mbox = &MailboxStatus{c.Mailbox()} + if mbox, err = getMailboxStatus(c, mboxName); err != nil { + return err + } return nil }) if err != nil { |