Exemple #1
0
        public async Task <IActionResult> Add(string name, int id)
        {
            // must check the id passing in is match for id from jwt token

            User user = await _repo.GetUser(id);

            if (await _repo.AddPortfolio(name, user))
            {
                return(Ok());
            }

            return(BadRequest("Failed to add Portfolio"));
        }