From 0f0626dc57db12747c21a88a0cadbc3e53eb9abe Mon Sep 17 00:00:00 2001 From: fullgream Date: Mon, 24 Feb 2025 18:07:38 +0300 Subject: [PATCH] fix once of example module --- modules/example_custom_auth.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/example_custom_auth.js b/modules/example_custom_auth.js index 005fb65..9722919 100644 --- a/modules/example_custom_auth.js +++ b/modules/example_custom_auth.js @@ -1,7 +1,7 @@ const express = require("express"); const { NetHelperModule } = global.moduleApi; -const HTTPReverse = require("../components/http-reverse"); +const HTTPServer = require("../components/_http"); module.exports = class CustomAuthPage extends NetHelperModule { constructor () { @@ -11,7 +11,7 @@ module.exports = class CustomAuthPage extends NetHelperModule { this.cauth = new this.statics.Operator("cauth", (argv) => { return argv.length === 2; }, (argv, self, syntaxTree) => { - if (![HTTPReverse].includes(syntaxTree.Type)) { + if (!(syntaxTree.Type.prototype instanceof HTTPServer)) { throw new SyntaxError("Unsupported type of server"); } const [ login, password ] = argv;