public async Task RemoveAllowedTopicAsync(string appId, string userId, TopicId prefix, CancellationToken ct = default) { var command = new RemoveUserAllowedTopic { Prefix = prefix }; await userStore.UpsertAsync(appId, userId, command, ct); await repository.UnsubscribeByPrefixAsync(appId, userId, prefix, ct); }
public async Task AllowedTopicRemoveAsync(string appId, string userId, TopicId prefix, CancellationToken ct) { var command = new RemoveUserAllowedTopic { Prefix = prefix }; await userStore.UpsertAsync(appId, userId, command, ct); await repository.DeletePrefixAsync(appId, userId, prefix, ct); }
public async Task <IActionResult> DeleteAllowedTopic(string appId, string id, string prefix) { var user = await userStore.GetAsync(appId, id, HttpContext.RequestAborted); if (user == null) { return(NotFound()); } var update = new RemoveUserAllowedTopic { Prefix = prefix }; await userStore.UpsertAsync(appId, id, update, HttpContext.RequestAborted); return(NoContent()); }