Beispiel #1
0
        public HttpResponseMessage Login(UserLogin request)
        {
            if (request == null)
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest, "please enter valid input"));
            }
            var userLogin = _usersProvider.Login(request);

            if (userLogin == "")
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest, "Email or password could not be found."));
            }

            return(req.CreateResponse(HttpStatusCode.OK, userLogin));
        }