From 569fb34a1fd71c5850485dbc469680d888150b49 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 10 Aug 2014 13:10:29 -0400 Subject: [PATCH] Use the ghost-paths consistently. Always using the utility function ensures that we have the ability to update/change/etc these paths without scouring the codebase. For example, if we ever decide to bump the API version it would be nice if there was only one location it needed to be updated at. --- core/client/assets/lib/uploader.js | 2 +- core/client/router.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/client/assets/lib/uploader.js b/core/client/assets/lib/uploader.js index 672d7b2aa0..433b8ab51a 100644 --- a/core/client/assets/lib/uploader.js +++ b/core/client/assets/lib/uploader.js @@ -63,7 +63,7 @@ UploadUi = function ($dropzone, settings) { var self = this; $dropzone.find('.js-fileupload').fileupload().fileupload('option', { - url: Ghost.subdir + '/ghost/api/v0.1/uploads/', + url: Ghost.apiRoot + '/uploads/', add: function (e, data) { /*jshint unused:false*/ $('.js-button-accept').prop('disabled', true); diff --git a/core/client/router.js b/core/client/router.js index c8b71dd987..f4ad652c00 100644 --- a/core/client/router.js +++ b/core/client/router.js @@ -6,7 +6,7 @@ var Router = Ember.Router.extend(); Router.reopen({ location: 'trailing-history', // use HTML5 History API instead of hash-tag based URLs - rootURL: ghostPaths().subdir + '/ghost/', // admin interface lives under sub-directory /ghost + rootURL: ghostPaths().adminRoot, // admin interface lives under sub-directory /ghost clearNotifications: function () { this.notifications.closePassive();