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

@ -101,7 +101,7 @@ function fetchAll() {
$.ajax({
type: "GET",
dataType: "json",
url: "report/",
url: "v1/reports/",
success: function(data, status, jqXHR) {
var e = new Error();
e.fromJSON(data);
@ -129,7 +129,7 @@ function create(report) {
$.ajax({
type: "POST",
dataType: "json",
url: "report/",
url: "v1/reports/",
data: {report: report.toJSON()},
success: function(data, status, jqXHR) {
var e = new Error();
@ -156,7 +156,7 @@ function update(report) {
$.ajax({
type: "PUT",
dataType: "json",
url: "report/"+report.ReportId+"/",
url: "v1/reports/"+report.ReportId+"/",
data: {report: report.toJSON()},
success: function(data, status, jqXHR) {
var e = new Error();
@ -184,7 +184,7 @@ function remove(report) {
$.ajax({
type: "DELETE",
dataType: "json",
url: "report/"+report.ReportId+"/",
url: "v1/reports/"+report.ReportId+"/",
success: function(data, status, jqXHR) {
var e = new Error();
e.fromJSON(data);
@ -208,7 +208,7 @@ function tabulate(report) {
$.ajax({
type: "GET",
dataType: "json",
url: "report/"+report.ReportId+"/tabulation/",
url: "v1/reports/"+report.ReportId+"/tabulations/",
success: function(data, status, jqXHR) {
var e = new Error();
e.fromJSON(data);