summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/channels/create.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api/endpoints/channels/create.ts')
-rw-r--r--src/server/api/endpoints/channels/create.ts6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/server/api/endpoints/channels/create.ts b/src/server/api/endpoints/channels/create.ts
index 0f0f558c8a..0e3c9dc5ac 100644
--- a/src/server/api/endpoints/channels/create.ts
+++ b/src/server/api/endpoints/channels/create.ts
@@ -8,14 +8,10 @@ import { pack } from '../../../../models/channel';
/**
* Create a channel
- *
- * @param {any} params
- * @param {any} user
- * @return {Promise<any>}
*/
module.exports = async (params, user) => new Promise(async (res, rej) => {
// Get 'title' parameter
- const [title, titleErr] = $(params.title).string().range(1, 100).$;
+ const [title, titleErr] = $.str.range(1, 100).get(params.title);
if (titleErr) return rej('invalid title param');
// Create a channel