public async Task <IActionResult> PostSubscription([FromBody] SubscriptionDto request) { var update = request.ToUpdate(); var subscription = await subscriptionStore.UpsertAsync(App.Id, UserId, request.TopicPrefix, update, HttpContext.RequestAborted); var response = SubscriptionDto.FromDomainObject(subscription); return(Ok(response)); }
public async Task <IActionResult> GetSubscription(string topic) { var subscription = await subscriptionStore.GetAsync(App.Id, UserId !, topic, HttpContext.RequestAborted); if (subscription == null) { return(NotFound()); } var response = SubscriptionDto.FromDomainObject(subscription); return(Ok(response)); }