Esempio n. 1
0
        public async Task <ActionResult <ApplicationData> > GetApplicationDraftAsync(string basketId)
        {
            if (string.IsNullOrEmpty(basketId))
            {
                return(BadRequest("Need a valid basketid"));
            }
            // Get the basket data and build a application draft based on it
            var basket = await _basketService.GetById(basketId);

            if (basket == null)
            {
                return(BadRequest($"No basket found for id {basketId}"));
            }

            return(await _applyingService.GetApplicationDraftAsync(basket));
        }