feat: more review comments

This commit is contained in:
=
2025-10-10 00:09:48 +05:30
parent d2a6a47397
commit 9d204a66fd
16 changed files with 32 additions and 20 deletions
@@ -41,7 +41,7 @@ export const membershipIdentityDALFactory = (db: TDbClient) => {
.leftJoin(TableName.Role, `${TableName.MembershipRole}.customRoleId`, `${TableName.Role}.id`)
.leftJoin(TableName.IdentityMetadata, (queryBuilder) => {
void queryBuilder
.on(`${TableName.Membership}.actorIdentityId`, `${TableName.IdentityMetadata}.userId`)
.on(`${TableName.Membership}.actorIdentityId`, `${TableName.IdentityMetadata}.identityId`)
.andOn(`${TableName.Membership}.scopeOrgId`, `${TableName.IdentityMetadata}.orgId`);
})
.where(`${TableName.Membership}.scopeOrgId`, scopeData.orgId)
@@ -272,7 +272,7 @@ export const membershipIdentityServiceFactory = ({
if (existingMembership.actorIdentityId === dto.permission.id)
throw new BadRequestError({
message: "You can't delete you own membership"
message: "You can't delete your own membership"
});
const membershipDoc = await membershipIdentityDAL.transaction(async (tx) => {
@@ -41,7 +41,7 @@ export const newOrgMembershipIdentityFactory = ({
const onCreateMembershipIdentityGuard: TMembershipIdentityScopeFactory["onCreateMembershipIdentityGuard"] =
async () => {
throw new BadRequestError({
message: "Organizatin membership cannot be created for organization scoped identity"
message: "Organization membership cannot be created for organization scoped identity"
});
};
@@ -88,7 +88,7 @@ export const newOrgMembershipIdentityFactory = ({
const onDeleteMembershipIdentityGuard: TMembershipIdentityScopeFactory["onDeleteMembershipIdentityGuard"] =
async () => {
throw new BadRequestError({
message: "Organizatin membership cannot be created for organization scoped identity"
message: "Organization membership cannot be created for organization scoped identity"
});
};