Esempio n. 1
0
        public async Task <ActionResult <ApiResponse <AddNewUserViewModel> > > AddUser([FromBody] AddNewUserViewModel data)
        {
            var result = await _auth.AddNewUserAsync(User, data);

            if (result)
            {
                return(StatusCodeResult(StatusCodes.Status201Created, null, InfoMessages.CommonInfoMessage));
            }

            return(BadRequest(ErrorMessages.CommonErrorMessage));
        }