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

Prefix all API endpoints with 'v1/', pluralize collections

This commit is contained in:
2017-11-11 08:05:09 -05:00
parent 79ed5dad9f
commit 9429b748fa
20 changed files with 86 additions and 86 deletions

View File

@ -21,19 +21,19 @@ func newSession(user *User) (*http.Client, error) {
client = *server.Client()
client.Jar = jar
create(&client, user, &u, "/session/", "user")
create(&client, user, &u, "/v1/sessions/", "user")
return &client, nil
}
func getSession(client *http.Client) (*handlers.Session, error) {
var s handlers.Session
err := read(client, &s, "/session/", "session")
err := read(client, &s, "/v1/sessions/", "session")
return &s, err
}
func deleteSession(client *http.Client) error {
return remove(client, "/session/", "session")
return remove(client, "/v1/sessions/", "session")
}
func sessionExistsOrError(c *http.Client) error {