/// <summary>
        /// 
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public async Task UpdateUsersRole(DTOAPIReq_UpdateUsersRole info)
        {
            var cmd = new UpdateAccountsRoleCommand 
            {
                users = info.users,
                roles = info.roles
            }; //this.mapper.Map<DTOAPIReq_UpdateUsersRole, UpdateAccountsRoleCommand>(info);

            await this.publishEndpoint.Publish(cmd);
            return;
            // throw new NotImplementedException();
        }
示例#2
0
        public async Task <IActionResult> UpdateUsersRole([FromBody] DTOAPIReq_UpdateUsersRole info)
        {
            try
            {
                await this.services.UpdateUsersRole(info).ConfigureAwait(false);

                return(OkEx(null));
            }
            catch (Exception ex)
            {
                return(JsonToCamelCase(ex.Message, 50000, 50000));
            }
        }