Exemplo n.º 1
0
        public async Task <IActionResult> Put([FromBody] ModifyMeRequest request)
        {
            int currentUserId = this.GetCurrentUserId();

            User user = await _userDataSource.Update(
                currentUserId, request.Name, request.Info, request.Birthday);

            if (user == null)
            {
                return(NotFound());
            }

            return(Ok(user));
        }
Exemplo n.º 2
0
 public void UpdateUser()
 {
     UserDataSource dataSource = new UserDataSource();
     dataSource.Update(this);
 }