Minor fixes for apidocs and comments (#11249)

* improve comments for api.getUserChallenges

* clarify members parameter when creating test guilds

I was uncertain about this parameter and read the code to clarify it.
Reading a comment is easier. :)

* add "Custom Day Start time" to api route's title as it's the common name
This commit is contained in:
Alys
2019-07-10 00:18:41 +10:00
committed by Matteo Pagliazzi
parent 0b32692290
commit 544a703df5
4 changed files with 6 additions and 6 deletions

View File

@@ -425,11 +425,11 @@ api.getUserChallenges = {
/**
* @api {get} /api/v3/challenges/groups/:groupId Get challenges for a group
* @apiDescription Get challenges that the user is a member, public challenges and the ones from the user's groups.
* @apiDescription Get challenges hosted in the specified group.
* @apiName GetGroupChallenges
* @apiGroup Challenge
*
* @apiParam (Path) {UUID} groupId The group _id
* @apiParam (Path) {UUID} groupId The group id ('party' for the user party and 'habitrpg' for tavern are accepted)
*
* @apiSuccess {Array} data An array of challenges sorted with official challenges first, followed by the challenges in order from newest to oldest
*
@@ -462,7 +462,7 @@ api.getGroupChallenges = {
const challenges = await Challenge.find({ group: groupId })
.sort('-createdAt')
// .populate('leader', nameFields) // Only populate the leader as the group is implicit
// .populate('leader', nameFields) // Only populate the leader as the group is implicit // see below why we're not using populate
.exec();
let resChals = challenges.map(challenge => challenge.toJSON());