Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set a maximum number of datasets for each user #70

Merged
merged 3 commits into from
Oct 27, 2024

Conversation

AbdulrhmanGoni
Copy link
Owner

No description provided.

Update `createDataset_service` function to make it checks if
the user has reached the maximum number datasets or not
before adding the new dataset, if he has, a failure result will
be returned.
Make `createDataset_service` function creates a new user
datasets docment if the user has not one,

Create `successfulDatasetCreation` to reuse it to register the
new dataset creation activity and to return the success result

Also cancel using transaction session because there is
only one write operation and there is no need to transactions.

Also delete failedDatasetCreation method from
`operationsResultsMessages` object because its usage is
strange and doesn't have a clear reason behind it.
Copy link

codecov bot commented Oct 27, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/services/datasets/createDataset_service.ts 78.37% 8 Missing ⚠️
Files with missing lines Coverage Δ
src/constants/maxDatasetsForUser.ts 100.00% <100.00%> (ø)
src/constants/operationsResultsMessages.ts 100.00% <100.00%> (+2.04%) ⬆️
src/services/datasets/createDataset_service.ts 83.67% <78.37%> (-6.33%) ⬇️

@AbdulrhmanGoni AbdulrhmanGoni merged commit 507689f into main Oct 27, 2024
2 checks passed
@AbdulrhmanGoni AbdulrhmanGoni deleted the feature/maximum-number-of-datasets-for-each-user branch October 27, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant