예제 #1
0
        public WebResult Post([FromBody] DanmakuModel data)
        {
            if (data == null)
            {
                return(new WebResult());
            }
            data.Ip      = Ip.Ip2Long(Request.Headers["X-Real-IP"]);
            data.Referer = Request.Headers["Referer"].FirstOrDefault();

            var result = _dd.Insert(new DanmakuInsert(data)) == 0 ? new WebResult() : new WebResult {
                Code = 0
            };

            return(result);
        }