Skip to content

Commit

Permalink
fixed restore admin bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaileshParmar11 committed Oct 25, 2023
1 parent 0899b24 commit e957770
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { Paging } from '../../generated/type/paging';
import { SearchResponse } from '../../interface/search.interface';
import { searchData } from '../../rest/miscAPI';
import { getUsers, UsersQueryParams } from '../../rest/userAPI';
import { formatUsersResponse } from '../../utils/APIUtils';
import { showErrorToast } from '../../utils/ToastUtils';

const teamsAndUsers = [GlobalSettingOptions.USERS, GlobalSettingOptions.ADMINS];
Expand Down Expand Up @@ -118,9 +117,9 @@ const UserListPageV1 = () => {
isDeleted
)
.then((res) => {
const data = formatUsersResponse(
(res.data as SearchResponse<SearchIndex.USER>).hits.hits
);
const data = (
res.data as SearchResponse<SearchIndex.USER>
).hits.hits.map(({ _source }) => _source);
setPaging({
total: res.data.hits.total.value,
});
Expand All @@ -143,7 +142,7 @@ const UserListPageV1 = () => {

userQuerySearch(value, pageNumber, isAdminPage, showDeletedUser).then(
(resUsers) => {
setUserList(resUsers as unknown as User[]);
setUserList(resUsers);
setIsDataLoading(false);
}
);
Expand Down

0 comments on commit e957770

Please sign in to comment.