fix once of example module
This commit is contained in:
parent
daa38cdeab
commit
0f0626dc57
@ -1,7 +1,7 @@
|
|||||||
const express = require("express");
|
const express = require("express");
|
||||||
const { NetHelperModule } = global.moduleApi;
|
const { NetHelperModule } = global.moduleApi;
|
||||||
|
|
||||||
const HTTPReverse = require("../components/http-reverse");
|
const HTTPServer = require("../components/_http");
|
||||||
|
|
||||||
module.exports = class CustomAuthPage extends NetHelperModule {
|
module.exports = class CustomAuthPage extends NetHelperModule {
|
||||||
constructor () {
|
constructor () {
|
||||||
@ -11,7 +11,7 @@ module.exports = class CustomAuthPage extends NetHelperModule {
|
|||||||
this.cauth = new this.statics.Operator("cauth", (argv) => {
|
this.cauth = new this.statics.Operator("cauth", (argv) => {
|
||||||
return argv.length === 2;
|
return argv.length === 2;
|
||||||
}, (argv, self, syntaxTree) => {
|
}, (argv, self, syntaxTree) => {
|
||||||
if (![HTTPReverse].includes(syntaxTree.Type)) {
|
if (!(syntaxTree.Type.prototype instanceof HTTPServer)) {
|
||||||
throw new SyntaxError("Unsupported type of server");
|
throw new SyntaxError("Unsupported type of server");
|
||||||
}
|
}
|
||||||
const [ login, password ] = argv;
|
const [ login, password ] = argv;
|
||||||
|
Loading…
Reference in New Issue
Block a user