From 09cababd79f9d445aa027c93cdfe823745fa041a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 28 Feb 2018 18:04:46 +0100 Subject: Add stats route --- server/tests/utils/server/config.ts | 2 +- server/tests/utils/server/stats.ts | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 server/tests/utils/server/stats.ts (limited to 'server/tests/utils') diff --git a/server/tests/utils/server/config.ts b/server/tests/utils/server/config.ts index e5411117a..57f95a603 100644 --- a/server/tests/utils/server/config.ts +++ b/server/tests/utils/server/config.ts @@ -1,5 +1,5 @@ import { makeDeleteRequest, makeGetRequest, makePutBodyRequest } from '../' -import { CustomConfig } from '../../../../shared/models/config/custom-config.model' +import { CustomConfig } from '../../../../shared/models/server/custom-config.model' function getConfig (url: string) { const path = '/api/v1/config' diff --git a/server/tests/utils/server/stats.ts b/server/tests/utils/server/stats.ts new file mode 100644 index 000000000..9cdec6cff --- /dev/null +++ b/server/tests/utils/server/stats.ts @@ -0,0 +1,17 @@ +import { makeGetRequest } from '../' + +function getStats (url: string) { + const path = '/api/v1/server/stats' + + return makeGetRequest({ + url, + path, + statusCodeExpected: 200 + }) +} + +// --------------------------------------------------------------------------- + +export { + getStats +} -- cgit v1.2.3