2018-04-24 23:34:50 +02:00
|
|
|
import UserList, { pack } from '../../../../../models/user-list';
|
2018-11-02 05:47:44 +01:00
|
|
|
import define from '../../../define';
|
2018-04-24 23:34:50 +02:00
|
|
|
|
2018-07-16 21:36:44 +02:00
|
|
|
export const meta = {
|
|
|
|
desc: {
|
2018-08-28 23:59:43 +02:00
|
|
|
'ja-JP': '自分の作成したユーザーリスト一覧を取得します。'
|
2018-07-16 21:36:44 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
requireCredential: true,
|
|
|
|
|
|
|
|
kind: 'account-read'
|
|
|
|
};
|
|
|
|
|
2019-02-22 03:46:58 +01:00
|
|
|
export default define(meta, async (ps, me) => {
|
2018-04-24 23:34:50 +02:00
|
|
|
const userLists = await UserList.find({
|
|
|
|
userId: me._id,
|
|
|
|
});
|
|
|
|
|
2019-02-22 03:46:58 +01:00
|
|
|
return await Promise.all(userLists.map(x => pack(x)));
|
|
|
|
});
|