public static bool CreateUser(string nickname, string password) { byte[] tempImage = ImageToByte(Path + @"Pages\Image\default.png"); Users user = new Users(nickname, password, tempImage); return(_usersLogic.CreateUser(user)); }
public async Task <IActionResult> Signup(CreateUserRequest createUserRequest) { // TODO: check what happens when wrong input is given. var result = await _usersLogic.CreateUser(createUserRequest); if (result.SuccessResult == null || result.SuccessResult.Id < 1) { return(Ok(result)); } var user = result.SuccessResult; AddAuthCookie(Response, user.Id); return(Ok(GetUserDto(user))); }
public IHttpActionResult Post(UsersViewModel newUser) { _data.CreateUser(newUser); return(Ok("User Created")); }