From 883a9019085ff9013079d6b1539b86f2f519175a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 6 Jul 2021 16:02:11 +0200 Subject: Introduce debug command --- shared/extra-utils/server/debug.ts | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 shared/extra-utils/server/debug.ts (limited to 'shared/extra-utils/server/debug.ts') diff --git a/shared/extra-utils/server/debug.ts b/shared/extra-utils/server/debug.ts deleted file mode 100644 index f196812b7..000000000 --- a/shared/extra-utils/server/debug.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { makeGetRequest, makePostBodyRequest } from '../requests/requests' -import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes' -import { SendDebugCommand } from '@shared/models' - -function getDebug (url: string, token: string) { - const path = '/api/v1/server/debug' - - return makeGetRequest({ - url, - path, - token, - statusCodeExpected: HttpStatusCode.OK_200 - }) -} - -function sendDebugCommand (url: string, token: string, body: SendDebugCommand) { - const path = '/api/v1/server/debug/run-command' - - return makePostBodyRequest({ - url, - path, - token, - fields: body, - statusCodeExpected: HttpStatusCode.NO_CONTENT_204 - }) -} - -// --------------------------------------------------------------------------- - -export { - getDebug, - sendDebugCommand -} -- cgit v1.2.3