Skip to content

Commit 26f8216

Browse files
committed
Un-nest a switch
1 parent 63f3c04 commit 26f8216

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/node/api/server.ts

+9-10
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,15 @@ export class ApiHttpProvider extends HttpProvider {
3939
return this.login(request)
4040
}
4141
break
42-
default:
43-
if (!this.authenticated(request)) {
44-
return { code: HttpCode.Unauthorized }
45-
}
46-
switch (route.base) {
47-
case ApiEndpoint.applications:
48-
return this.applications()
49-
case ApiEndpoint.files:
50-
return this.files()
51-
}
42+
}
43+
if (!this.authenticated(request)) {
44+
return { code: HttpCode.Unauthorized }
45+
}
46+
switch (route.base) {
47+
case ApiEndpoint.applications:
48+
return this.applications()
49+
case ApiEndpoint.files:
50+
return this.files()
5251
}
5352
return undefined
5453
}

0 commit comments

Comments
 (0)