public override async Task HandleChangeClientSecretRequestAsync()

in dotnet/space-translate/SpaceTranslate/WebHook/SpaceTranslateWebHookHandler.Infrastructure.cs [95:108]


    public override async Task<ApplicationExecutionResult> HandleChangeClientSecretRequestAsync(ChangeClientSecretPayload payload)
    {
        var organization = await _db.Organizations.FirstOrDefaultAsync(it => it.ClientId == payload.ClientId);
        if (organization == null)
        {
            _logger.LogWarning("The organization does not exist. ClientId={ClientId}", payload.ClientId);
            return new ApplicationExecutionResult("The organization does not exist.", 400);
        }

        organization.ClientSecret = payload.NewClientSecret;
        await _db.SaveChangesAsync();
        
        return await base.HandleChangeClientSecretRequestAsync(payload);
    }