Пример #1
0
        public HttpResponseMessage Close([FromBody] KillModel model)
        {
            if (!model.ComputerName.Equals(ComputerName))
            {
                throw new UnauthorizedAccessException();
            }

            var steamService = new SteamConsoleService(SteamConsolePath);

            steamService.Close();

            return(new HttpResponseMessage(HttpStatusCode.OK));
        }
Пример #2
0
        public HttpResponseMessage Login([FromBody] LoginModel model)
        {
            if (!model.ComputerName.Equals(ComputerName))
            {
                throw new UnauthorizedAccessException();
            }

            var steamService = new SteamConsoleService(SteamConsolePath);

            steamService.Login(model.Username, model.Password);

            return(new HttpResponseMessage(HttpStatusCode.OK));
        }