|
|
@@ -23,7 +23,7 @@ const responseSchemas = {
|
|
23
|
23
|
|
|
24
|
24
|
const validators = {
|
|
25
|
25
|
params: params.profileId,
|
|
26
|
|
- query: params.profileInclude,
|
|
|
26
|
+ query: Joi.object({include_profile: Joi.bool(), limit: Joi.number(), offset: Joi.number()}),
|
|
27
|
27
|
}
|
|
28
|
28
|
|
|
29
|
29
|
module.exports = {
|
|
|
@@ -37,13 +37,12 @@ module.exports = {
|
|
37
|
37
|
cors: true,
|
|
38
|
38
|
handler: async function (request, h) {
|
|
39
|
39
|
const { profile_id } = request.params
|
|
40
|
|
- const { include_profile } = request.query
|
|
|
40
|
+ const { include_profile, limit, offset} = request.query
|
|
41
|
41
|
const { profileService, matchQueueService } =
|
|
42
|
42
|
request.server.services()
|
|
43
|
43
|
|
|
44
|
|
- const queue = await matchQueueService.getQueue(profile_id)
|
|
|
44
|
+ const queue = await matchQueueService.getQueue(profile_id, limit, offset)
|
|
45
|
45
|
const queueIds = queue.map(entry => entry.target_id)
|
|
46
|
|
- // console.log('queueIds', queueIds)
|
|
47
|
46
|
const res = {
|
|
48
|
47
|
ok: true,
|
|
49
|
48
|
handler: pluginConfig.handlerType,
|