From 9b41023c43add194d69259e0a8a8c323aa44c778 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 6 Jul 2018 02:58:29 +0900 Subject: wip --- src/server/api/endpoints/users/lists/create.ts | 2 +- src/server/api/endpoints/users/lists/list.ts | 2 +- src/server/api/endpoints/users/lists/push.ts | 2 +- src/server/api/endpoints/users/lists/show.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server/api/endpoints/users/lists') diff --git a/src/server/api/endpoints/users/lists/create.ts b/src/server/api/endpoints/users/lists/create.ts index cdd1a0d813..f3776afee0 100644 --- a/src/server/api/endpoints/users/lists/create.ts +++ b/src/server/api/endpoints/users/lists/create.ts @@ -5,7 +5,7 @@ import { ILocalUser } from '../../../../../models/user'; /** * Create a user list */ -module.exports = async (params: any, user: ILocalUser) => new Promise(async (res, rej) => { +export default async (params: any, user: ILocalUser) => new Promise(async (res, rej) => { // Get 'title' parameter const [title, titleErr] = $.str.range(1, 100).get(params.title); if (titleErr) return rej('invalid title param'); diff --git a/src/server/api/endpoints/users/lists/list.ts b/src/server/api/endpoints/users/lists/list.ts index bf8391d863..88fa75a111 100644 --- a/src/server/api/endpoints/users/lists/list.ts +++ b/src/server/api/endpoints/users/lists/list.ts @@ -4,7 +4,7 @@ import { ILocalUser } from '../../../../../models/user'; /** * Add a user to a user list */ -module.exports = async (params: any, me: ILocalUser) => new Promise(async (res, rej) => { +export default async (params: any, me: ILocalUser) => new Promise(async (res, rej) => { // Fetch lists const userLists = await UserList.find({ userId: me._id, diff --git a/src/server/api/endpoints/users/lists/push.ts b/src/server/api/endpoints/users/lists/push.ts index d8a3b3c9aa..0e7caea064 100644 --- a/src/server/api/endpoints/users/lists/push.ts +++ b/src/server/api/endpoints/users/lists/push.ts @@ -9,7 +9,7 @@ import { deliver } from '../../../../../queue'; /** * Add a user to a user list */ -module.exports = async (params: any, me: ILocalUser) => new Promise(async (res, rej) => { +export default async (params: any, me: ILocalUser) => new Promise(async (res, rej) => { // Get 'listId' parameter const [listId, listIdErr] = $.type(ID).get(params.listId); if (listIdErr) return rej('invalid listId param'); diff --git a/src/server/api/endpoints/users/lists/show.ts b/src/server/api/endpoints/users/lists/show.ts index e4ae239613..4716dd8211 100644 --- a/src/server/api/endpoints/users/lists/show.ts +++ b/src/server/api/endpoints/users/lists/show.ts @@ -5,7 +5,7 @@ import { ILocalUser } from '../../../../../models/user'; /** * Show a user list */ -module.exports = async (params: any, me: ILocalUser) => new Promise(async (res, rej) => { +export default async (params: any, me: ILocalUser) => new Promise(async (res, rej) => { // Get 'listId' parameter const [listId, listIdErr] = $.type(ID).get(params.listId); if (listIdErr) return rej('invalid listId param'); -- cgit v1.2.3-freya