File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,11 @@ var ConnectView = View.extend({
161161 evt . preventDefault ( ) ;
162162 this . toggle ( 'authOpen' ) ;
163163 if ( this . authOpen ) {
164- this . authMethod = 'MONGODB' ;
164+ if ( this . previousAuthMethod === 'NONE' ) {
165+ this . authMethod = 'MONGODB' ;
166+ } else {
167+ this . authMethod = this . previousAuthMethod ;
168+ }
165169 } else {
166170 this . authMethod = 'NONE' ;
167171 }
Original file line number Diff line number Diff line change @@ -26,15 +26,19 @@ module.exports = Connection.extend({
2626 test : function ( done ) {
2727 var model = this ;
2828 debug ( 'Testing connection to `%j`...' , this ) ;
29- client . test ( app . endpoint , model . serialize ( { all : true } ) , function ( err ) {
29+ client . test ( app . endpoint , model . serialize ( {
30+ all : true
31+ } ) , function ( err ) {
3032 if ( err ) {
3133 bugsnag . notify ( err , 'connection test failed' ) ;
3234 return done ( err ) ;
3335 }
3436
3537 debug ( 'test worked!' ) ;
3638 debug ( 'making sure we can get collection list...' ) ;
37- client ( app . endpoint , model . serialize ( { all : true } ) ) . instance ( function ( err , res ) {
39+ client ( app . endpoint , model . serialize ( {
40+ all : true
41+ } ) ) . instance ( function ( err , res ) {
3842 if ( ! err ) {
3943 debug ( 'woot. all gravy! able to see %s collections' , res . collections . length ) ;
4044 done ( null , model ) ;
@@ -47,5 +51,10 @@ module.exports = Connection.extend({
4751 } ) ;
4852 return this ;
4953 } ,
50- sync : connectionSync
54+ sync : connectionSync ,
55+ serialize : function ( ) {
56+ return Connection . prototype . serialize . call ( this , {
57+ all : true
58+ } ) ;
59+ }
5160} ) ;
You can’t perform that action at this time.
0 commit comments