2015-07-03 21:04:37 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Net;
|
|
|
|
|
using System.Net.Http;
|
|
|
|
|
using System.Web.Http;
|
|
|
|
|
|
|
|
|
|
namespace ChatRoomServer.Www.Areas.Api.Controllers
|
|
|
|
|
{
|
2015-07-08 17:24:45 +08:00
|
|
|
|
using System.Net.Http.Headers;
|
|
|
|
|
using System.Web.Http.Cors;
|
|
|
|
|
using System.Web.Http.Results;
|
|
|
|
|
using ChatRoomServer.Db;
|
|
|
|
|
|
2015-07-03 21:04:37 +08:00
|
|
|
|
[RoutePrefix("api/users")]
|
2015-07-08 17:24:45 +08:00
|
|
|
|
public class UsersController : ApiController
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
[EnableCors("http://12306.liebao.cn,http://test.fishlee.net", "*", "*", "")]
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
[Route("report")]
|
|
|
|
|
public bool ReportAbuse(string username, long msgid, string msgun)
|
2015-07-03 21:04:37 +08:00
|
|
|
|
{
|
2015-07-08 17:24:45 +08:00
|
|
|
|
if (msgid <= 0 || username.IsNullOrEmpty() || msgun.IsNullOrEmpty())
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
var db = new ChatDb();
|
|
|
|
|
|
2015-07-03 21:04:37 +08:00
|
|
|
|
|
|
|
|
|
return true;
|
2015-07-08 17:24:45 +08:00
|
|
|
|
|
2015-07-03 21:04:37 +08:00
|
|
|
|
}
|
2015-07-08 17:24:45 +08:00
|
|
|
|
}
|
2015-07-03 21:04:37 +08:00
|
|
|
|
}
|