public async Task <IActionResult> PutDisabledAsync([FromRoute] ObjectId id, [FromBody] PutDisabledModel model, CancellationToken cancellationToken) { await fSender.Send(new PutDisabledRequest(id, model), cancellationToken); await fSender.Send(new DeleteLoginRequest(id), cancellationToken); await Task.WhenAll ( fPublisher.Publish(new LoggedOutNotification(id), cancellationToken), fPublisher.Publish(new DisabledChangedNotification(id, model.Disabled), cancellationToken) ); return(NoContent()); }
public PutDisabledRequest(ObjectId clientId, PutDisabledModel model) { ClientId = clientId; Model = model ?? throw new System.ArgumentNullException(nameof(model)); }
public async Task <IActionResult> PutDisabledAsync([FromRoute] ObjectId id, [FromBody] PutDisabledModel model, CancellationToken cancellationToken) { await fSender.Send(new PutDisabledRequest(id, model), cancellationToken); return(NoContent()); }