1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2025-07-03 12:48:38 -04:00

Split Sessions into models

This commit is contained in:
2017-12-03 06:11:38 -05:00
parent e70be1647c
commit 3f4d6d15a1
4 changed files with 79 additions and 58 deletions

View File

@ -3,6 +3,7 @@ package handlers_test
import (
"fmt"
"github.com/aclindsa/moneygo/internal/handlers"
"github.com/aclindsa/moneygo/internal/models"
"net/http"
"net/http/cookiejar"
"net/url"
@ -26,8 +27,8 @@ func newSession(user *User) (*http.Client, error) {
return &client, nil
}
func getSession(client *http.Client) (*handlers.Session, error) {
var s handlers.Session
func getSession(client *http.Client) (*models.Session, error) {
var s models.Session
err := read(client, &s, "/v1/sessions/")
return &s, err
}