1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

Add size to mailbox listing JSON

This commit is contained in:
James Hillyerd
2013-10-15 16:19:47 -07:00
parent 6679ce9250
commit 91c44304c3

View File

@@ -12,7 +12,8 @@ import (
type JsonMessageHeader struct {
Mailbox, Id, From, Subject string
Date time.Time
Date time.Time
Size int64
}
func MailboxIndex(w http.ResponseWriter, req *http.Request, ctx *Context) (err error) {
@@ -52,6 +53,7 @@ func MailboxList(w http.ResponseWriter, req *http.Request, ctx *Context) (err er
From: msg.From(),
Subject: msg.Subject(),
Date: msg.Date(),
Size: msg.Size(),
}
}
return RenderJson(w, jmessages)