Exemplo n.º 1
0
        public async Task <SOApiResult <UserDto> > GetByUserId(Guid userId)
        {
            string      urlPath   = $"/UserApi/GetByUserId?userId={userId}";
            string      token     = WebAdminHelper.GetToken(_httpContextAccessor);
            SOApiParams apiParams = new SOApiParams(_httpClientFactory, token, urlPath, null);

            return(await SOApiHelper.ExecuteGetMethod <UserDto>(apiParams));
        }
Exemplo n.º 2
0
        public async Task <SOApiResult <bool> > UpdateBasicInfo(UserBasicInfoDto basicInfoDto)
        {
            string      urlPath   = "/UserApi/UpdateBasicInfo";
            string      token     = WebAdminHelper.GetToken(_httpContextAccessor);
            SOApiParams apiParams = new SOApiParams(_httpClientFactory, token, urlPath, basicInfoDto);;

            return(await SOApiHelper.ExecutePutMethod <bool>(apiParams));
        }
Exemplo n.º 3
0
        public async Task <SOApiResult <List <UserDto> > > GetUserList(ReadUserDto readUserDto)
        {
            string      urlPath   = "/UserApi/GetUserList";
            string      token     = WebAdminHelper.GetToken(_httpContextAccessor);
            SOApiParams apiParams = new SOApiParams(_httpClientFactory, token, urlPath, readUserDto);

            return(await SOApiHelper.ExecuteGetMethod <List <UserDto> >(apiParams));
        }
Exemplo n.º 4
0
        public async Task <SOApiResult <bool> > Create(CreateUserDto createUserDto)
        {
            string      urlPath   = "/UserApi/Create";
            string      token     = WebAdminHelper.GetToken(_httpContextAccessor);
            SOApiParams apiParams = new SOApiParams(_httpClientFactory, token, urlPath, createUserDto);;

            return(await SOApiHelper.ExecutePostMethod <bool>(apiParams));
        }