Skip to content

Commit 91fa27d

Browse files
committed
views, API docs: clarify /latest vs. /pending
It should be mentioned that the endpoint /latest only returns accepted comments.
1 parent f2f6aa0 commit 91fa27d

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

isso/views/comments.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,12 +1543,12 @@ def admin(self, env, req):
15431543
@apiName latest
15441544
@apiVersion 0.12.6
15451545
@apiDescription
1546-
Get the latest comments from the system, no matter which thread. Only available if `[general] latest-enabled` is set to `true` in server config.
1546+
Get the latest accepted comments from the system, no matter which thread. Only available if `[general] latest-enabled` is set to `true` in server config.
15471547
15481548
@apiQuery {Number} limit
15491549
The quantity of last comments to retrieve
15501550
1551-
@apiExample {curl} Get the latest 5 comments
1551+
@apiExample {curl} Get the latest 5 accepted comments
15521552
curl 'https://comments.example.com/latest?limit=5'
15531553
15541554
@apiUse commentResponse
@@ -1605,13 +1605,15 @@ def check_auth(self, username, password):
16051605
@apiName pending
16061606
@apiVersion 0.13.0
16071607
@apiDescription
1608-
Get the latest comments from the system waiting moderation, no matter which thread. Only available if `[general] pending-enabled` is set to `true` in server config.
1608+
Get the latest comments waiting moderation from the system, no matter which thread. Only available if `[general] pending-enabled` is set to `true` and `[admin] enabled is set to `true` in server config.
1609+
1610+
@apiHeader {String="Basic BASE64_CREDENTIALS"} authorization Base64 encoded "USERNAME:PASSWORD"
16091611
16101612
@apiQuery {Number} limit
16111613
The quantity of last comments to retrieve
16121614
16131615
@apiExample {curl} Get the latest 5 pending comments
1614-
curl 'https://comments.example.com/pending?limit=5'
1616+
curl -u 'admin:ADMIN_PASSWORD' 'https://comments.example.com/pending?limit=5'
16151617
16161618
@apiUse commentResponse
16171619

0 commit comments

Comments
 (0)