File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export class AtelierAPI {
43
43
public readonly wsOrFile ?: string | vscode . Uri ;
44
44
45
45
public get ns ( ) : string {
46
- return ( this . namespace || this . _config . ns ) . toUpperCase ( ) ;
46
+ return ( this . namespace || this . _config . ns || "" ) . toUpperCase ( ) ;
47
47
}
48
48
49
49
public get config ( ) : ConnectionSettings {
@@ -340,16 +340,12 @@ export class AtelierAPI {
340
340
}
341
341
}
342
342
343
- /**
344
- * Use the serverInfo endpoint. Connection object does not need to have specified a namespace when instantiated.
345
- */
346
343
public serverInfo ( ) : Promise < Atelier . Response < Atelier . Content < Atelier . ServerInfo > > > {
347
344
return this . request ( 0 , "GET" ) . then ( ( info ) => {
348
345
if ( info && info . result && info . result . content && info . result . content . api > 0 ) {
349
346
const data = info . result . content ;
350
347
const apiVersion = data . api ;
351
- // If this is a namespace-specific connection, throw if it doesn't exist or if the user has no access to it
352
- if ( this . ns && ! data . namespaces . includes ( this . ns . toUpperCase ( ) ) ) {
348
+ if ( ! data . namespaces . includes ( this . ns ) ) {
353
349
throw {
354
350
code : "WrongNamespace" ,
355
351
message : `This server does not have specified namespace '${ this . ns } '.\n
You can’t perform that action at this time.
0 commit comments