From 7602e8f9383be37c0f7d9359f862c366b7f2fa00 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 24 Apr 2018 18:13:06 +0900 Subject: cafy 5.xに移行 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/api/endpoints/channels/show.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/server/api/endpoints/channels/show.ts') diff --git a/src/server/api/endpoints/channels/show.ts b/src/server/api/endpoints/channels/show.ts index 3ce9ce4745..3f468937ed 100644 --- a/src/server/api/endpoints/channels/show.ts +++ b/src/server/api/endpoints/channels/show.ts @@ -1,19 +1,15 @@ /** * Module dependencies */ -import $ from 'cafy'; +import $ from 'cafy'; import ID from '../../../../cafy-id'; import Channel, { IChannel, pack } from '../../../../models/channel'; /** * Show a channel - * - * @param {any} params - * @param {any} user - * @return {Promise} */ module.exports = (params, user) => new Promise(async (res, rej) => { // Get 'channelId' parameter - const [channelId, channelIdErr] = $(params.channelId).id().$; + const [channelId, channelIdErr] = $(params.channelId).type(ID).$; if (channelIdErr) return rej('invalid channelId param'); // Fetch channel -- cgit v1.2.3-freya