Skip to content

Commit a693103

Browse files
Thomasrludomikula
authored andcommitted
added get_organization api
1 parent 34111c5 commit a693103

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,11 @@ public Mono<ResponseView<Organization>> updateSlug(@PathVariable String orgId, @
182182
.map(ResponseView::success);
183183
}
184184

185-
}
185+
@Override
186+
public Mono<ResponseView<Organization>> getOrganization(@PathVariable String orgId) {
187+
return gidService.convertOrganizationIdToObjectId(orgId)
188+
.flatMap(id -> organizationService.getById(id))
189+
.map(ResponseView::success);
190+
}
191+
192+
}

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,15 @@ public Mono<ResponseView<Boolean>> removeUserFromOrg(@PathVariable String orgId,
184184
@PutMapping("/{orgId}/slug")
185185
Mono<ResponseView<Organization>> updateSlug(@PathVariable String orgId, @RequestBody String slug);
186186

187+
@Operation(
188+
tags = TAG_ORGANIZATION_MANAGEMENT,
189+
operationId = "getOrganization",
190+
summary = "Get Organization by ID",
191+
description = "Retrieve details of a specific Organization within Lowcoder using its unique ID."
192+
)
193+
@GetMapping("/{orgId}")
194+
public Mono<ResponseView<Organization>> getOrganization(@PathVariable String orgId);
195+
187196
public record UpdateOrgCommonSettingsRequest(String key, Object value) {
188197

189198
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy