From 90f8fe7e538bb7e52d2558152a0390e693f39b11 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Thu, 29 Mar 2018 01:20:40 +0900 Subject: Introduce processor --- src/api/endpoints/stats.ts | 48 ---------------------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 src/api/endpoints/stats.ts (limited to 'src/api/endpoints/stats.ts') diff --git a/src/api/endpoints/stats.ts b/src/api/endpoints/stats.ts deleted file mode 100644 index a6084cd17a..0000000000 --- a/src/api/endpoints/stats.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Module dependencies - */ -import Post from '../models/post'; -import User from '../models/user'; - -/** - * @swagger - * /stats: - * post: - * summary: Show the misskey's statistics - * responses: - * 200: - * description: Success - * schema: - * type: object - * properties: - * posts_count: - * description: count of all posts of misskey - * type: number - * users_count: - * description: count of all users of misskey - * type: number - * - * default: - * description: Failed - * schema: - * $ref: "#/definitions/Error" - */ - -/** - * Show the misskey's statistics - * - * @param {any} params - * @return {Promise} - */ -module.exports = params => new Promise(async (res, rej) => { - const postsCount = await Post - .count(); - - const usersCount = await User - .count(); - - res({ - posts_count: postsCount, - users_count: usersCount - }); -}); -- cgit v1.2.3-freya