Esempio n. 1
0
        public async Task <IActionResult> PostContributor(string appId, [FromBody] AddContributorDto request)
        {
            var update = request.ToUpdate(UserId);

            var app = await appStore.UpsertAsync(appId, update, HttpContext.RequestAborted);

            var response = await AppDetailsDto.FromDomainObjectAsync(app, UserId, userResolver);

            return(Ok(response));
        }
Esempio n. 2
0
        public async Task <IActionResult> DeleteContributor(string appId, string contributorId)
        {
            var update = new RemoveContributor {
                ContributorId = contributorId, UserId = UserId
            };

            var app = await appStore.UpsertAsync(appId, update, HttpContext.RequestAborted);

            var response = await AppDetailsDto.FromDomainObjectAsync(app, UserId, userResolver);

            return(Ok(response));
        }
Esempio n. 3
0
        public async Task <IActionResult> GetApp(string appId)
        {
            var response = await AppDetailsDto.FromDomainObjectAsync(App, UserId, userResolver);

            return(Ok(response));
        }