Skip to content

Commit

Permalink
feat: clarify chama updates to add members
Browse files Browse the repository at this point in the history
  • Loading branch information
okjodom committed Feb 12, 2025
1 parent 28671f0 commit b73f768
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apps/chama/src/chamas/chamas.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ export class ChamasService {
hunk.description = updates.description;
}

if (updates.members) {
const registered = await this.resolveMembers(updates.members);
if (updates.addMembers) {
const registered = await this.resolveMembers(updates.addMembers);
hunk.members = this.deduplicateMembers(cd.members, registered);
}

Expand Down
5 changes: 3 additions & 2 deletions libs/common/src/dto/chama.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
type FindChamaRequest,
type JoinChamaRequest,
type UpdateChamaRequest,
type PaginatedRequest,
} from '../types';
import { NpubDecorators, PhoneDecorators } from './decorators';
import { PaginatedRequestDto } from './lib.dto';
Expand Down Expand Up @@ -167,7 +168,7 @@ export class ChamaUpdatesDto implements ChamaUpdates {
},
],
})
members: ChamaMember[];
addMembers: ChamaMember[];
}

export class UpdateChamaDto implements UpdateChamaRequest {
Expand Down Expand Up @@ -207,7 +208,7 @@ export class FilterChamasDto implements FilterChamasRequest {
@ValidateNested()
@Type(() => PaginatedRequestDto)
@ApiProperty({ type: PaginatedRequestDto })
pagination?: PaginatedRequestDto;
pagination?: PaginatedRequest;
}

export class JoinChamaDto implements JoinChamaRequest {
Expand Down
2 changes: 1 addition & 1 deletion libs/common/src/types/proto/chama.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/chama.proto
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ message UpdateChamaRequest {
message ChamaUpdates {
optional string name = 1;
optional string description = 2;
repeated ChamaMember members = 3;
repeated ChamaMember add_members = 3;
}

message FindChamaRequest {
Expand Down

0 comments on commit b73f768

Please sign in to comment.