File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
org-service/src/main/java/com/codecampus/organization
search-service/src/main/java/com/codecampus/search/service Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ default OrganizationPayload toOrganizationPayloadFromOrganization(
2828 return OrganizationPayload .builder ()
2929 .name (organization .getName ())
3030 .description (organization .getDescription ())
31+ .ownerId (organization .getOwnerId ())
3132 .logoUrl (organization .getLogoUrl ())
3233 .email (organization .getEmail ())
3334 .phone (organization .getPhone ())
@@ -43,6 +44,7 @@ default OrganizationResponse toOrganizationResponseFromOrganization(
4344 .id (o .getId ())
4445 .name (o .getName ())
4546 .description (o .getDescription ())
47+ .ownerId (o .getOwnerId ())
4648 .logoUrl (o .getLogoUrl ())
4749 .email (o .getEmail ())
4850 .phone (o .getPhone ())
Original file line number Diff line number Diff line change @@ -58,11 +58,7 @@ public void create(
5858
5959 o = organizationRepository .save (o );
6060
61- String creatorUserId = AuthenticationHelper .getMyUserId ();
62- if (creatorUserId != null && !creatorUserId .isBlank ()) {
63- // mặc định role=Admin, active=true
64- membershipService .addCreatorToOrg (creatorUserId , o .getId ());
65- }
61+ membershipService .addCreatorToOrg (userId , o .getId ());
6662
6763 // publish CREATED
6864 OrganizationPayload payload =
Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ BoolQuery.Builder buildQuery(
206206 bv .should (s -> s .term (t -> t .field ("visibility" ).value (true )));
207207 if (viewerOrgId != null ) {
208208 bv .should (s -> s .terms (ts -> ts .field ("orgId" ).terms (tv -> tv .value (
209- java . util . List .of (FieldValue .of (viewerOrgId ))
209+ List .of (FieldValue .of (viewerOrgId ))
210210 ))));
211211 }
212212 return bv ;
You can’t perform that action at this time.
0 commit comments