示例#1
0
        public IHttpActionResult UnsetAdmin([FromBody] JObject request)
        {
            Repo <Group> cr    = new GroupRepo();
            Group        group = request.ToObject <Group>();

            group.Admin = null;
            cr.Update(group);
            return(Ok());
        }
示例#2
0
        public IHttpActionResult UnPinMessage([FromBody] JObject request)
        {
            Message      msg   = request["message"].ToObject <Message>();
            Repo <Group> cr    = new GroupRepo();
            Group        group = request["group"].ToObject <Group>();

            group.PinnedMessage = null;
            cr.Update(group);
            return(Ok());
        }
示例#3
0
        public IHttpActionResult ChangeAdmin([FromBody] JObject request)
        {
            User         conv  = request["user"].ToObject <User>();
            Repo <Group> cr    = new GroupRepo();
            Group        group = request["group"].ToObject <Group>();

            group.Admin = conv;
            cr.Update(group);
            return(Ok());
        }