From 27785849b4b92ea0d9652ef55951a2ae0b8a6e04 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Tue, 31 Mar 2020 16:37:52 +0200 Subject: [PATCH] Implement new methods --- src/entities/WebSocketRequestHandler.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/entities/WebSocketRequestHandler.ts b/src/entities/WebSocketRequestHandler.ts index f8c2ef2..be708d4 100644 --- a/src/entities/WebSocketRequestHandler.ts +++ b/src/entities/WebSocketRequestHandler.ts @@ -26,11 +26,13 @@ export class UserWebSocketRequestsHandler extends BaseRequestsHandler { protected getPostParam(name: string) { - throw new Error("Method not implemented."); + return this.req.data[name]; } public hasPostParameter(name: string): boolean { - throw new Error("Method not implemented."); + return this.req.data.hasOwnProperty(name) + && this.req.data[name] != null + && this.req.data[name] != undefined; } public error(code: number, message: string): void {