private object GetCheckUsernameResponseMessage(CheckUserNameStatus status) { switch (status) { case CheckUserNameStatus.AlreadyHasSameName: return("Korisnik već ima to korisničko ime."); case CheckUserNameStatus.Taken: return(new HttpResponseMessage { StatusCode = HttpStatusCode.BadRequest, Content = new StringContent("Korisničko ime se već koristi.") }); default: return("Korisničko ime je slobodno."); } }
private HttpResponseMessage GetCheckEmailResponseMessage(CheckUserNameStatus status) { switch (status) { case CheckUserNameStatus.AlreadyHasSameName: return(new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent("Korisnik već ima tu adresu.") }); case CheckUserNameStatus.Taken: return(new HttpResponseMessage { StatusCode = HttpStatusCode.BadRequest, Content = new StringContent("Email se već koristi.") }); default: return(new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent("Email je slobodan.") }); } }