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)); }
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)); }