@@ -201,7 +201,7 @@ if (!window.console) {
201201 _validateEmailPassword ( email , password ) ;
202202 ClearBlade . request ( {
203203 method : 'POST' ,
204- endpoint : 'api/user/reg' ,
204+ endpoint : 'api/v1/ user/reg' ,
205205 useUser : false ,
206206 body : { "email" : email , "password" : password }
207207 } , function ( err , response ) {
@@ -216,7 +216,7 @@ if (!window.console) {
216216 ClearBlade . isCurrentUserAuthenticated = function ( callback ) {
217217 ClearBlade . request ( {
218218 method : 'POST' ,
219- endpoint : 'api/user/checkauth'
219+ endpoint : 'api/v1/ user/checkauth'
220220 } , function ( err , response ) {
221221 if ( err ) {
222222 execute ( true , response , callback ) ;
@@ -229,7 +229,7 @@ if (!window.console) {
229229 ClearBlade . logoutUser = function ( callback ) {
230230 ClearBlade . request ( {
231231 method : 'POST' ,
232- endpoint : 'api/user/logout'
232+ endpoint : 'api/v1/ user/logout'
233233 } , function ( err , response ) {
234234 if ( err ) {
235235 execute ( true , response , callback ) ;
@@ -244,7 +244,7 @@ if (!window.console) {
244244 ClearBlade . request ( {
245245 method : 'POST' ,
246246 useUser : false ,
247- endpoint : 'api/user/anon'
247+ endpoint : 'api/v1/ user/anon'
248248 } , function ( err , response ) {
249249 if ( err ) {
250250 execute ( true , response , callback ) ;
@@ -260,7 +260,7 @@ if (!window.console) {
260260 ClearBlade . request ( {
261261 method : 'POST' ,
262262 useUser : false ,
263- endpoint : 'api/user/auth' ,
263+ endpoint : 'api/v1/ user/auth' ,
264264 body : { "email" : email , "password" : password }
265265 } , function ( err , response ) {
266266 if ( err ) {
@@ -568,7 +568,7 @@ if (!window.console) {
568568
569569 var reqOptions = {
570570 method : 'GET' ,
571- endpoint : 'api/' + this . ID ,
571+ endpoint : 'api/v1/data/ ' + this . ID ,
572572 qs : query
573573 } ;
574574 var colID = this . ID ;
@@ -608,7 +608,7 @@ if (!window.console) {
608608 ClearBlade . Collection . prototype . create = function ( newItem , callback ) {
609609 var reqOptions = {
610610 method : 'POST' ,
611- endpoint : 'api/' + this . ID ,
611+ endpoint : 'api/v1/data/ ' + this . ID ,
612612 body : newItem
613613 } ;
614614 if ( typeof callback === 'function' ) {
@@ -645,7 +645,7 @@ if (!window.console) {
645645 ClearBlade . Collection . prototype . update = function ( _query , changes , callback ) {
646646 var reqOptions = {
647647 method : 'PUT' ,
648- endpoint : 'api/' + this . ID ,
648+ endpoint : 'api/v1/data/ ' + this . ID ,
649649 body : { query : _query . OR , $set : changes }
650650 } ;
651651 if ( typeof callback === 'function' ) {
@@ -685,7 +685,7 @@ if (!window.console) {
685685
686686 var reqOptions = {
687687 method : 'DELETE' ,
688- endpoint : 'api/' + this . ID ,
688+ endpoint : 'api/v1/data/ ' + this . ID ,
689689 qs : query
690690 } ;
691691 if ( typeof callback === 'function' ) {
@@ -869,7 +869,7 @@ if (!window.console) {
869869 if ( this . collection === undefined || this . collection === "" ) {
870870 throw new Error ( "No collection was defined" ) ;
871871 } else {
872- reqOptions . endpoint = "api/" + this . collection ;
872+ reqOptions . endpoint = "api/v1/data/ " + this . collection ;
873873 }
874874 if ( typeof callback === 'function' ) {
875875 _request ( reqOptions , callback ) ;
@@ -903,7 +903,7 @@ if (!window.console) {
903903 if ( this . collection === undefined || this . collection === "" ) {
904904 throw new Error ( "No collection was defined" ) ;
905905 } else {
906- reqOptions . endpoint = "api/" + this . collection ;
906+ reqOptions . endpoint = "api/v1/data/ " + this . collection ;
907907 }
908908 var colID = this . collection ;
909909 var callCallback = function ( err , data ) {
@@ -964,7 +964,7 @@ if (!window.console) {
964964 if ( this . collection === undefined || this . collection === "" ) {
965965 throw new Error ( "No collection was defined" ) ;
966966 } else {
967- reqOptions . endpoint = "api/" + this . collection ;
967+ reqOptions . endpoint = "api/v1/data/ " + this . collection ;
968968 }
969969 if ( typeof callback === 'function' ) {
970970 _request ( reqOptions , callCallback ) ;
@@ -1015,7 +1015,7 @@ if (!window.console) {
10151015 if ( this . collection == undefined || this . collection == "" ) {
10161016 throw new Error ( "No collection was defined" ) ;
10171017 } else {
1018- reqOptions . endpoint = "api/" + this . collection ;
1018+ reqOptions . endpoint = "api/v1/data/ " + this . collection ;
10191019 }
10201020 if ( typeof callback === 'function' ) {
10211021 _request ( reqOptions , callCallback ) ;
0 commit comments