Ejemplo n.º 1
0
        public async Task <HttpResponseMessage> SaveGroupSetting([FromBody] ChatRequest.GroupSettingRequest request)
        {
            var response = await _service.AddGroupSetting(request, Request.GetSession()).ConfigureAwait(false);

            //return Request.SystemResponse(response.Status, new { GroupId = response.Data });
            return(Request.SystemResponse <string>(response.Status));
        }
Ejemplo n.º 2
0
        public async Task <StatusData <string> > AddGroupSetting(ChatRequest.GroupSettingRequest request, SystemSession session)
        {
            var chatGroupSettingObject = "[{" + string.Join("}, {", request.GroupS.Select(x => string.Format("\"k\": \"{0}\", \"v\": \"{1}\"", x.K, x.V))) + "}]";
            await Task.Factory.StartNew(() => Client.ChatGroupService.addSettings(session.UserName, request.GroupId, chatGroupSettingObject, session.GetSession())).ConfigureAwait(false);

            var result = new StatusData <string> {
                Status = SystemDbStatus.Inserted
            };

            return(result);
        }
Ejemplo n.º 3
0
 public Task <StatusData <string> > AddGroupSetting(ChatRequest.GroupSettingRequest request, SystemSession session)
 {
     return(_jUnitOfWork.Chat.AddGroupSetting(request, session));
 }