Beispiel #1
0
        public IActionResult LogIn()
        {
            StreamReader bodyStream = new StreamReader(HttpContext.Request.Body);
            string       body       = bodyStream.ReadToEndAsync().Result;

            if (UserDatabaseAccess.LogIn(_context, NetworkAPI.User.DeSerializeJson(body)))
            {
                VolatileLogs.Add("LogIn: " + body);
                return(StatusCode(200));
            }
            else
            {
                return(StatusCode(401));
            }
        }