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

Include project notes in the NotesService Get response. #53

Merged
merged 2 commits into from
Jun 1, 2024

Conversation

AhmedZaki99
Copy link
Contributor

As discussed in #47

The NotesService.GetAsync method was neglecting the returned project notes:

public async Task<IEnumerable<Note>> GetAsync(CancellationToken cancellationToken = default)
{
    var response = await TodoistClient.GetResourcesAsync(cancellationToken, ResourceType.Notes).ConfigureAwait(false);

    return response.Notes;
}

The new design returns a new model that contains both collections of notes:

public async Task<NotesInfo> GetAsync(CancellationToken cancellationToken = default)
{
    var response = await TodoistClient.GetResourcesAsync(cancellationToken, ResourceType.Notes).ConfigureAwait(false);

    return new NotesInfo
    {
        ItemNotes = response.Notes,
        ProjectNotes = response.ProjectNotes
    };
}

Copy link

sonarqubecloud bot commented Jun 1, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@olsh olsh merged commit 6dffea7 into olsh:master Jun 1, 2024
2 checks passed
@olsh
Copy link
Owner

olsh commented Jun 1, 2024

Thank you! 👍🏻

@AhmedZaki99 AhmedZaki99 deleted the patch-project-notes branch June 2, 2024 06:07
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.

2 participants