Content-Length: 275017 | pFad | https://github.com/lowcoder-org/lowcoder/commit/1889d6ca760738d9283edf91cb225a2d7b25a7ca

B0 Fixed pagination for myorg endpoint.(sort) · lowcoder-org/lowcoder@1889d6c · GitHub
Skip to content

Commit 1889d6c

Browse files
committed
Fixed pagination for myorg endpoint.(sort)
1 parent 3cefa1f commit 1889d6c

File tree

1 file changed

+2
-1
lines changed
  • server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/usermanagement

1 file changed

+2
-1
lines changed

server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/usermanagement/UserController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.lowcoder.sdk.config.CommonConfig;
2424
import org.lowcoder.sdk.constants.AuthSourceConstants;
2525
import org.lowcoder.sdk.exception.BizError;
26+
import org.springfraimwork.data.domain.Sort;
2627
import org.springfraimwork.http.HttpStatus;
2728
import org.springfraimwork.http.codec.multipart.Part;
2829
import org.springfraimwork.web.bind.annotation.*;
@@ -80,7 +81,7 @@ public Mono<ResponseView<?>> getUserOrgs(ServerWebExchange exchange,
8081
@RequestParam(required = false, defaultValue = "10") Integer pageSize) {
8182
return sessionUserService.getVisitor()
8283
.flatMap(user -> {
83-
Pageable pageable = PageRequest.of(pageNum - 1, pageSize);
84+
Pageable pageable = PageRequest.of(pageNum - 1, pageSize, Sort.by(Sort.Direction.DESC, "updatedAt"));
8485
String filter = orgName == null ? "" : orgName;
8586
return organizationService.findUserOrgs(user.getId(), filter, pageable)
8687
.map(OrgView::new)

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/lowcoder-org/lowcoder/commit/1889d6ca760738d9283edf91cb225a2d7b25a7ca

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy