mirror of
https://github.com/paricafe/misskey.git
synced 2024-12-04 04:36:44 -06:00
15 lines
367 B
TypeScript
15 lines
367 B
TypeScript
import Matching, { pack as packMatching } from '../../../../models/reversi-matching';
|
|
|
|
module.exports = (params, user) => new Promise(async (res, rej) => {
|
|
// Find session
|
|
const invitations = await Matching.find({
|
|
childId: user._id
|
|
}, {
|
|
sort: {
|
|
_id: -1
|
|
}
|
|
});
|
|
|
|
// Reponse
|
|
res(Promise.all(invitations.map(async (i) => await packMatching(i, user))));
|
|
});
|