mirror of
https://github.com/danog/code-server.git
synced 2024-11-26 20:34:56 +01:00
Un-nest a switch
This commit is contained in:
parent
63f3c04c57
commit
26f8216ec8
@ -39,16 +39,15 @@ export class ApiHttpProvider extends HttpProvider {
|
|||||||
return this.login(request)
|
return this.login(request)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
default:
|
}
|
||||||
if (!this.authenticated(request)) {
|
if (!this.authenticated(request)) {
|
||||||
return { code: HttpCode.Unauthorized }
|
return { code: HttpCode.Unauthorized }
|
||||||
}
|
}
|
||||||
switch (route.base) {
|
switch (route.base) {
|
||||||
case ApiEndpoint.applications:
|
case ApiEndpoint.applications:
|
||||||
return this.applications()
|
return this.applications()
|
||||||
case ApiEndpoint.files:
|
case ApiEndpoint.files:
|
||||||
return this.files()
|
return this.files()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user