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({
161
161
evt . preventDefault ( ) ;
162
162
this . toggle ( 'authOpen' ) ;
163
163
if ( this . authOpen ) {
164
- this . authMethod = 'MONGODB' ;
164
+ if ( this . previousAuthMethod === 'NONE' ) {
165
+ this . authMethod = 'MONGODB' ;
166
+ } else {
167
+ this . authMethod = this . previousAuthMethod ;
168
+ }
165
169
} else {
166
170
this . authMethod = 'NONE' ;
167
171
}
Original file line number Diff line number Diff line change @@ -26,15 +26,19 @@ module.exports = Connection.extend({
26
26
test : function ( done ) {
27
27
var model = this ;
28
28
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 ) {
30
32
if ( err ) {
31
33
bugsnag . notify ( err , 'connection test failed' ) ;
32
34
return done ( err ) ;
33
35
}
34
36
35
37
debug ( 'test worked!' ) ;
36
38
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 ) {
38
42
if ( ! err ) {
39
43
debug ( 'woot. all gravy! able to see %s collections' , res . collections . length ) ;
40
44
done ( null , model ) ;
@@ -47,5 +51,10 @@ module.exports = Connection.extend({
47
51
} ) ;
48
52
return this ;
49
53
} ,
50
- sync : connectionSync
54
+ sync : connectionSync ,
55
+ serialize : function ( ) {
56
+ return Connection . prototype . serialize . call ( this , {
57
+ all : true
58
+ } ) ;
59
+ }
51
60
} ) ;
You can’t perform that action at this time.
0 commit comments