//public void UpdateUser(Credentials c, UserContents newU) { // //try { // // //UserManipulator.Update() // //} catch (Exception ex) { // // throw new ActionException("Unable to update credentials.", ActionType.User, // // MemeType.Fuuuuu, ex); // //} // //return new ActionResult("Credentials updated.", "", // // ActionType.User); // throw new ActionException("Updating credentials is not properly handled...", // ActionType.User, MemeType.Fuuuuu); //} public void DelUser(Credentials c) { try { using (FileSyncModelClient cl = new FileSyncModelClient()) { cl.DelUser(c); } } catch (Exception ex) { throw new ActionException("Unable to delete the user account.", ActionType.User, MemeType.Fuuuuu, ex); } }
public void Login(Credentials c) { try { using (FileSyncModelClient cl = new FileSyncModelClient()) { cl.Login(c); } } catch (Exception ex) { throw new ActionException("Login was not successful.", ActionType.User, MemeType.AreYouFuckingKiddingMe, ex); } }
public void AddUser(Credentials c, UserContents u) { try { using (FileSyncModelClient cl = new FileSyncModelClient()) { cl.AddUser(c, u); } } catch (Exception ex) { throw new ActionException("Unable to create new user account.", ActionType.User, MemeType.Fuuuuu, ex); } }
//public void Logout() { // throw new ActionException("Logout is not properly handled...", ActionType.User, // MemeType.Fuuuuu); //} public UserContents GetUser(Credentials c) { try { UserContents u; using (FileSyncModelClient cl = new FileSyncModelClient()) { u = cl.GetUser(c); } return(u); } catch (Exception ex) { throw new ActionException("Unable to get user details for the given credentials.", ActionType.User, MemeType.Fuuuuu, ex); } }