diff options
Diffstat (limited to 'src/server/api/endpoints/channels/show.ts')
| -rw-r--r-- | src/server/api/endpoints/channels/show.ts | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/server/api/endpoints/channels/show.ts b/src/server/api/endpoints/channels/show.ts index 3ce9ce4745..1bba63d490 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<any>} */ module.exports = (params, user) => new Promise(async (res, rej) => { // Get 'channelId' parameter - const [channelId, channelIdErr] = $(params.channelId).id().$; + const [channelId, channelIdErr] = $.type(ID).get(params.channelId); if (channelIdErr) return rej('invalid channelId param'); // Fetch channel |