Exemple #1
0
        public async Task <ActionResult <Budget> > Get(string userId)
        {
            if (_jwtToken.UserId == userId)
            {
                var budget = await _budgetsService.GetByUserId(userId);

                if (budget != null)
                {
                    return(budget);
                }

                return(NotFound());
            }

            return(Unauthorized());
        }