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> PostSubscription(string appId, string id, [FromBody] SubscriptionDto request) { var user = await userStore.GetAsync(appId, id, HttpContext.RequestAborted); if (user == null) { return(NotFound()); } var update = request.ToUpdate(); await subscriptionStore.UpsertAsync(appId, UserId, request.TopicPrefix, update, HttpContext.RequestAborted); return(NoContent()); }