Exemple #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));
        }
Exemple #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));
        }
Exemple #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));
        }
Exemple #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));
        }