public async Task <IActionResult> InsertDetection([FromBody] InsertDetection request) { DetectionLogic detectionLogic = new DetectionLogic(); await detectionLogic.InsertDetection(request); if (!detectionLogic.Response.IsSuccessful) { return(BadRequest(detectionLogic.Response.ErrorMessage)); } return(Ok("Success")); }
public async Task <IActionResult> GetReport([FromQuery] DateTime fromDate, DateTime toDate) { string userGuid = HttpContext.Request.Headers["UserGuid"]; DetectionLogic detectionLogic = new DetectionLogic(); List <DetectionResponse> detections = await detectionLogic.ReadDetection(fromDate, toDate, userGuid); if (detections == null) { return(Ok(new List <DetectionResponse>())); } return(Ok(detections)); }
public async Task <IActionResult> GetDetection() { string userGuid = HttpContext.Request.Headers["UserGuid"]; DetectionLogic detectionLogic = new DetectionLogic(); List <Detection> detections = await detectionLogic.GetByUserGuid(userGuid); if (detections == null) { return(Ok(new List <Detection>())); } return(Ok(detections)); }
//private bool actionStarted = false; //public GameObject playerToAttack; //private float animSpeed = 5f; // Use this for initialization void Start() { agent = GetComponent <NavMeshAgent>(); anim = GetComponent <Animator>(); player = GameObject.FindGameObjectWithTag("Player"); det = gameObject.GetComponent <DetectionLogic>(); // currentState = TurnState.PROCESSING; //BSM = GameObject.Find("BattleManager").GetComponent<BattleStateMachine> (); //startPosition = transform.position; isActionTime = false; //isWaitingTime = true; megaTimer = 3f; isMegaTime = true; }