InfiniLore / infinilore.cs

GNU General Public License v3.0
2 stars 1 forks source link

Rework how AsyncResults deliver Result objects for notifying the end-user #18

Closed github-actions[bot] closed 3 days ago

github-actions[bot] commented 5 days ago

📝 Todo : Rework how AsyncResults deliver Result objects for notifying the end-user

Description:

Code Snippet:


    public async override Task HandleAsync(GetAllLoreScopesRequest req, CancellationToken ct) {
        await using InfiniLoreDbContext dbContext = await dbContextFactory.CreateDbContextAsync(ct);

        // TODO Rework how AsyncResults deliver Result objects for notifying the end-user
        AsyncResult<InfiniLoreUser> result = await resolveUserIdService.ResolveUserIdAsync(dbContext, req, ct);
        if (result is not { Value: {} user }) {
            await SendResultAsync(result.FailedIResult!);

File:
https://github.com/InfiniLore/infinilore.cs/blob/9da0cc18f139a377d356085805b4ef1c1f1e37f6/src/server/InfiniLore.Server.API/Controllers/LoreScopes/GetAll/GetAllLoreScopes.cs#L37

github-actions[bot] commented 3 days ago

Closed in 5668fc16a112057a454a594cbdc22c7887dcd804.