1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2025-07-02 20:28:38 -04:00

testing: Test fetching all a user's accounts

This commit is contained in:
2017-10-12 22:19:53 -04:00
parent c26ce83aa3
commit 6726d9cb2f
4 changed files with 55 additions and 2 deletions

View File

@ -124,6 +124,11 @@ func (al *AccountList) Write(w http.ResponseWriter) error {
return enc.Encode(al)
}
func (al *AccountList) Read(json_str string) error {
dec := json.NewDecoder(strings.NewReader(json_str))
return dec.Decode(al)
}
func GetAccount(db *DB, accountid int64, userid int64) (*Account, error) {
var a Account