Get as far as storing an incoming mail in crockery.db
This commit is contained in:
@@ -53,9 +53,18 @@ func (c *concrete) FindAccount(username string) (Account, error) {
|
||||
}
|
||||
|
||||
func (c *concrete) FindAccounts(usernames ...string) ([]Account, error) {
|
||||
var accounts []Account
|
||||
accounts := make([]Account, len(usernames))
|
||||
|
||||
return accounts, c.storm.Find("Username", usernames, &accounts)
|
||||
// FIXME: I don't know how to storm, it turns out
|
||||
for i, username := range usernames {
|
||||
account, err := c.FindAccount(username)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
accounts[i] = account
|
||||
}
|
||||
|
||||
return accounts, nil
|
||||
}
|
||||
|
||||
func (c *concrete) FindAccountWithPassword(username, password string) (Account, error) {
|
||||
|
Reference in New Issue
Block a user