From 4f9b7432dd4d323ac6cc4efceeae2efaffe62e7d Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 27 Sep 2016 16:58:23 +0200 Subject: Fix #52 - Add API versioning (v1) --- app/assets/javascripts/components/actions/interactions.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/assets/javascripts/components/actions/interactions.jsx') diff --git a/app/assets/javascripts/components/actions/interactions.jsx b/app/assets/javascripts/components/actions/interactions.jsx index 3b3e2a6b6..8ce0c7561 100644 --- a/app/assets/javascripts/components/actions/interactions.jsx +++ b/app/assets/javascripts/components/actions/interactions.jsx @@ -12,7 +12,7 @@ export function reblog(status) { return function (dispatch, getState) { dispatch(reblogRequest(status)); - api(getState).post(`/api/statuses/${status.get('id')}/reblog`).then(function (response) { + api(getState).post(`/api/v1/statuses/${status.get('id')}/reblog`).then(function (response) { // The reblog API method returns a new status wrapped around the original. In this case we are only // interested in how the original is modified, hence passing it skipping the wrapper dispatch(reblogSuccess(status, response.data.reblog)); @@ -24,7 +24,7 @@ export function reblog(status) { export function unreblog(status) { return (dispatch, getState) => { - api(getState).post(`/api/statuses/${status.get('id')}/unreblog`).then(response => { + api(getState).post(`/api/v1/statuses/${status.get('id')}/unreblog`).then(response => { // }).catch(error => { // @@ -59,7 +59,7 @@ export function favourite(status) { return function (dispatch, getState) { dispatch(favouriteRequest(status)); - api(getState).post(`/api/statuses/${status.get('id')}/favourite`).then(function (response) { + api(getState).post(`/api/v1/statuses/${status.get('id')}/favourite`).then(function (response) { dispatch(favouriteSuccess(status, response.data)); }).catch(function (error) { dispatch(favouriteFail(status, error)); @@ -69,7 +69,7 @@ export function favourite(status) { export function unfavourite(status) { return (dispatch, getState) => { - api(getState).post(`/api/statuses/${status.get('id')}/unfavourite`).then(response => { + api(getState).post(`/api/v1/statuses/${status.get('id')}/unfavourite`).then(response => { // }).catch(error => { // -- cgit