File tree Expand file tree Collapse file tree 4 files changed +8
-11
lines changed
Expand file tree Collapse file tree 4 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ release.sh
66coverage
77* .swp
88dist /js-sdk-api-docs
9+ .idea
Original file line number Diff line number Diff line change 1212 },
1313 "dependencies" : {
1414 "debug" : " ^2.2.0" ,
15- "form-data" : " ^1.0.0-rc4" ,
1615 "localstorage-memory" : " ^1.0.1" ,
1716 "md5" : " ^2.0.0" ,
1817 "qiniu" : " 6.1.3" ,
Original file line number Diff line number Diff line change @@ -137,6 +137,10 @@ const init = (AV) => {
137137 }
138138 AVConfig . APIServerURL = API_HOST [ region ] ;
139139 if ( region === 'cn' ) {
140+ // TODO: remove appId match hack
141+ if ( AV . applicationId . indexOf ( '-9Nh9j0Va' ) !== - 1 ) {
142+ AVConfig . APIServerURL = 'https://e1-api.leancloud.cn' ;
143+ }
140144 Cache . get ( 'APIServerURL' ) . then ( cachedServerURL => {
141145 if ( cachedServerURL ) {
142146 return cachedServerURL ;
Original file line number Diff line number Diff line change 22
33describe ( 'files' , function ( ) {
44 describe ( 'Saving base64' , function ( ) {
5- it ( 'should be saved' , function ( done ) {
5+ it ( 'should be saved' , function ( ) {
66 var base64 = 'd29ya2luZyBhdCBhdm9zY2xvdWQgaXMgZ3JlYXQh' ;
77 var file = new AV . File ( 'myfile.txt' , { base64 : base64 } ) ;
88 file . metaData ( 'format' , 'txt file' ) ;
99 file . setACL ( new AV . ACL ( ) ) ;
10- file . save ( ) . then ( function ( ) {
10+ return file . save ( ) . then ( function ( ) {
1111 expect ( file . ownerId ( ) ) . to . be . ok ( ) ;
1212 expect ( file . id ) . to . be . ok ( ) ;
1313 expect ( file . metaData ( 'format' ) ) . to . be ( 'txt file' ) ;
14-
15- file . destroy ( ) . then ( function ( ) {
16- done ( ) ;
17- } , function ( error ) {
18- done ( error ) ;
19- } ) ;
20- } , function ( error ) {
21- done ( error ) ;
14+ return file . destroy ( ) ;
2215 } ) ;
2316 } ) ;
2417 } ) ;
You can’t perform that action at this time.
0 commit comments