Esempio n. 1
0
        public async Task PostStorage(string id, [FromBody] StorageRequestModel model)
        {
            var orgIdGuid = new Guid(id);

            if (!_currentContext.OrganizationOwner(orgIdGuid))
            {
                throw new NotFoundException();
            }

            await _organizationService.AdjustStorageAsync(orgIdGuid, model.StorageGbAdjustment.Value);
        }
Esempio n. 2
0
        public async Task <PaymentResponseModel> PostStorage(string id, [FromBody] StorageRequestModel model)
        {
            var orgIdGuid = new Guid(id);

            if (!await _currentContext.OrganizationOwner(orgIdGuid))
            {
                throw new NotFoundException();
            }

            var result = await _organizationService.AdjustStorageAsync(orgIdGuid, model.StorageGbAdjustment.Value);

            return(new PaymentResponseModel
            {
                Success = true,
                PaymentIntentClientSecret = result
            });
        }