1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2025-07-02 20:28: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

@ -72,7 +72,7 @@ function fetchAll() {
$.ajax({
type: "GET",
dataType: "json",
url: "security/",
url: "v1/securities/",
success: function(data, status, jqXHR) {
var e = new Error();
e.fromJSON(data);
@ -100,7 +100,7 @@ function create(security) {
$.ajax({
type: "POST",
dataType: "json",
url: "security/",
url: "v1/securities/",
data: {security: security.toJSON()},
success: function(data, status, jqXHR) {
var e = new Error();
@ -127,7 +127,7 @@ function update(security) {
$.ajax({
type: "PUT",
dataType: "json",
url: "security/"+security.SecurityId+"/",
url: "v1/securities/"+security.SecurityId+"/",
data: {security: security.toJSON()},
success: function(data, status, jqXHR) {
var e = new Error();
@ -154,7 +154,7 @@ function remove(security) {
$.ajax({
type: "DELETE",
dataType: "json",
url: "security/"+security.SecurityId+"/",
url: "v1/securities/"+security.SecurityId+"/",
success: function(data, status, jqXHR) {
var e = new Error();
e.fromJSON(data);