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

Use case: Adding a deadline given a note identifier and a date. #31

Open
Tracked by #32
Pablito2020 opened this issue Feb 21, 2023 · 2 comments · Fixed by #35
Open
Tracked by #32

Use case: Adding a deadline given a note identifier and a date. #31

Pablito2020 opened this issue Feb 21, 2023 · 2 comments · Fixed by #35
Assignees
Labels
enhancement New feature or request

Comments

@Pablito2020
Copy link
Member

This use case should receive a note identifier and a date object, and must:

  • Check if a deadline is already configured for this note, if it is, throw an exception and don't add it to the repository
  • Save the deadline to the repository.
@Pablito2020 Pablito2020 added the enhancement New feature or request label Feb 21, 2023
@Pablito2020 Pablito2020 self-assigned this Feb 21, 2023
@FerranAD FerranAD reopened this Mar 4, 2023
@FerranAD
Copy link
Member

FerranAD commented Mar 4, 2023

Don't you think the use case should also check if the provided note identifier exists and throw an expection if it doesn't? I say this since we're expecting notifications to behave like this #20:

This use case will receive a noteIdentifier and a date, and then:

  1. Will search if the note exists on the NoteRepository, if it doesn't will throw an exception (NoSuchNoteException? See the note >package for the current name).

@Pablito2020
Copy link
Member Author

Yes, I think that adding the note repository as a dependency of the notification use cases makes sense, since a notification doesn't exist without a note (which is the core of our app, so makes sense that is the parent node on the dependency graph).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants