serverpreconfigured 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function checkWSAuth(ws: any, msg: any): Promise<boolean>;
|
|
@@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.checkWSAuth = void 0;
|
|
15
16
|
const random_1 = require("../utils/string/random");
|
|
16
17
|
const wsauth_1 = require("../wsauth/wsauth");
|
|
17
18
|
const response_1 = require("../utils/response");
|
|
@@ -52,3 +53,4 @@ function checkWSAuth(ws, msg) {
|
|
|
52
53
|
}
|
|
53
54
|
});
|
|
54
55
|
}
|
|
56
|
+
exports.checkWSAuth = checkWSAuth;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "serverpreconfigured",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "\"Pre-configured server with authentication system and database integration\"",
|
|
5
5
|
"main": "dist/server.js",
|
|
6
6
|
"keywords": ["server","pre configured","database","authentication"],
|
|
@@ -4,7 +4,7 @@ import { WSResponse } from "../utils/response";
|
|
|
4
4
|
import { authenticateWS } from "../server";
|
|
5
5
|
import meta_sanitizer from "meta-sanitizer";
|
|
6
6
|
const DEBUG=true;
|
|
7
|
-
async function checkWSAuth(ws:any,msg:any):Promise<boolean>{
|
|
7
|
+
export async function checkWSAuth(ws:any,msg:any):Promise<boolean>{
|
|
8
8
|
try{
|
|
9
9
|
if(ws.userId && ws.connectionToken){
|
|
10
10
|
if((await checkConnectionAuth(ws.userId,ws.connectionToken)))
|