예제 #1
0
        public async Task <ApiResponse> GetByAgent(string business_id, string agent_id, string access_token)
        {
            ApiResponse response = new ApiResponse();

            try
            {
                var resultData = await _shortcutService.GetByAgent(business_id, agent_id);

                response.ok   = true;
                response.data = resultData;
            }
            catch (Exception ex)
            {
                _logService.Create(new Log
                {
                    message  = ex.Message,
                    category = "Shortcut",
                    link     = $"{Request.HttpContext.Request.Scheme}://{Request.HttpContext.Request.Host}{Request.HttpContext.Request.Path}{Request.HttpContext.Request.QueryString}",
                    details  = JsonConvert.SerializeObject(ex.StackTrace),
                    name     = string.Format("Get shortcuts by business_id: {0}", business_id)
                });
            }
            return(response);
        }