move forum topic participants route above where it is matched in another regex. Reduce the number of items returned from the topic participants endpoint.

pull/2281/head
Gordon Martin 2016-09-26 09:20:27 +01:00
parent 40003a97a6
commit daabac8fcb
2 changed files with 2 additions and 2 deletions

View File

@ -357,12 +357,12 @@ GET /forum/search controllers.ForumPost.search(text: String
GET /forum/:slug controllers.ForumCateg.show(slug: String, page: Int ?= 1)
GET /forum/:categSlug/form controllers.ForumTopic.form(categSlug: String)
POST /forum/:categSlug/new controllers.ForumTopic.create(categSlug: String)
GET /forum/participants/:topicId controllers.ForumTopic.participants(topicId: String)
GET /forum/:categSlug/:slug controllers.ForumTopic.show(categSlug: String, slug: String, page: Int ?= 1)
POST /forum/:categSlug/:slug/close controllers.ForumTopic.close(categSlug: String, slug: String)
POST /forum/:categSlug/:slug/hide controllers.ForumTopic.hide(categSlug: String, slug: String)
POST /forum/:categSlug/:slug/new controllers.ForumPost.create(categSlug: String, slug: String, page: Int ?= 1)
POST /forum/:categSlug/delete/:id controllers.ForumPost.delete(categSlug: String, id: String)
GET /forum/participants/:topicId controllers.ForumTopic.participants(topicId: String)
POST /forum/post/:id controllers.ForumPost.edit(id: String)
GET /forum/redirect/post/:id controllers.ForumPost.redirect(id: String)

View File

@ -71,7 +71,7 @@ sealed abstract class PostRepo(troll: Boolean) {
* Returns the a subset of the list of the users participating in a thread.
* */
def topicParticipants(topicId: String) : Fu[Set[String]] = {
coll.find(selectTopic(topicId)).cursor[Bdoc](ReadPreference.secondaryPreferred).gather[Set](200)
coll.find(selectTopic(topicId)).cursor[Bdoc](ReadPreference.secondaryPreferred).gather[Set](15)
.map {
_ flatMap {
_.getAs[String]("userId")