mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 14:15:24 +00:00
fix: finish 2.9.0 plugin moves and get every check green
This commit is contained in:
1 parent
8c1e02af89
commit
6489b62ece
335 files changed
+29878
-17749
No files matched your search
@@ -82,10 +82,14 @@ async function openTunnel(
|
||||
endpoint: WebEndpoint,
|
||||
): Promise<{ bindHost: string; bindPort: number }> {
|
||||
const userId = ctx.currentActor();
|
||||
let tunnels: TunnelsAccess;
|
||||
let tunnels: TunnelsAccess | undefined;
|
||||
try {
|
||||
tunnels = ctx.services.get<TunnelsAccess>("tunnels.access", { userId });
|
||||
} catch {
|
||||
tunnels = undefined;
|
||||
}
|
||||
// A missing provider hands back an empty handle rather than throwing.
|
||||
if (typeof tunnels?.forward !== "function") {
|
||||
throw Object.assign(new Error("The tunnels plugin is not available"), {
|
||||
status: 503,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user