feat(platform): add the notification inbox and deterministic match search
This commit is contained in:
1 parent
5edff21d2d
commit
0b11021b16
169 files changed
+17083
-443
No files matched your search
@@ -194,6 +194,17 @@ func (repository companyQuotaRepository) reserveNewCardView(
|
||||
return outbound.CompanyQuotaDecision{Allowed: true}, nil
|
||||
}
|
||||
|
||||
func (repository companyQuotaRepository) LockOrganization(ctx context.Context, organizationID uuid.UUID) error {
|
||||
const location = "companyQuotaRepository.LockOrganization"
|
||||
if _, err := repository.queries.LockCompanyQuotaOrganizationFirst(ctx, pgUUID(organizationID)); err != nil {
|
||||
if errors.Is(err, pgx.ErrNoRows) {
|
||||
return fmt.Errorf("%s - organization was removed: %w", location, outbound.ErrCompanyQuotaSnapshotChanged)
|
||||
}
|
||||
return fmt.Errorf("%s - lock organization: %w", location, mapOrganizationError(err))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (repository companyQuotaRepository) lockAndCheckSnapshot(
|
||||
ctx context.Context,
|
||||
location string,
|
||||
|
||||
Reference in new issue
Block a user