Skip to content

Commit 8fc73bd

Browse files
aapelivclaude
andcommitted
Rename discussions page size constant to MAX_PAGE_SIZE
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent a7f4c3b commit 8fc73bd

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

app/backend/src/couchers/servicers/discussions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
logger = logging.getLogger(__name__)
2424

25-
MAX_DISCUSSIONS_PAGE_SIZE = 25
25+
MAX_PAGE_SIZE = 25
2626

2727

2828
def discussion_to_pb(session: Session, discussion: Discussion, context: CouchersContext) -> discussions_pb2.Discussion:
@@ -172,7 +172,7 @@ def GetDiscussion(
172172
def ListMyCommunitiesDiscussions(
173173
self, request: discussions_pb2.ListMyCommunitiesDiscussionsReq, context: CouchersContext, session: Session
174174
) -> discussions_pb2.ListMyCommunitiesDiscussionsRes:
175-
page_size = min(MAX_DISCUSSIONS_PAGE_SIZE, request.page_size or MAX_DISCUSSIONS_PAGE_SIZE)
175+
page_size = min(MAX_PAGE_SIZE, request.page_size or MAX_PAGE_SIZE)
176176
next_page_id = int(request.page_token) if request.page_token else 2**63 - 1
177177

178178
discussions = (

app/proto/discussions.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ message GetDiscussionReq {
5555
}
5656

5757
message ListMyCommunitiesDiscussionsReq {
58-
uint32 page_size = 1; // Maximum: 25
58+
uint32 page_size = 1;
5959
string page_token = 2;
6060
}
6161

0 commit comments

Comments
 (0)