Skip to content

Commit

Permalink
chore(ui): add organization id to list api keys api
Browse files Browse the repository at this point in the history
Signed-off-by: Alessandro Yuichi Okimoto <[email protected]>
  • Loading branch information
cre8ivejp committed Dec 12, 2024
1 parent afc6af7 commit 3b93269
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/web-v2/src/modules/apiKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const listAPIKeys = createAsyncThunk<
{ state: AppState }
>(`${MODULE_NAME}/list`, async (params) => {
const request = new ListAPIKeysRequest();
request.setOrganizationId(params.organizationId);
request.setEnvironmentIdsList(params.environmentIds);
request.setPageSize(params.pageSize);
request.setCursor(params.cursor);
Expand All @@ -59,6 +60,7 @@ export type OrderDirection =
ListAPIKeysRequest.OrderDirectionMap[keyof ListAPIKeysRequest.OrderDirectionMap];

interface APIKeyParams {
organizationId: string;
environmentIds: string[];
pageSize: number;
cursor: string;
Expand Down
2 changes: 2 additions & 0 deletions ui/web-v2/src/pages/apiKey/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import { APIKey } from '../../proto/account/api_key_pb';
import { ListAPIKeysRequest } from '../../proto/account/service_pb';
import { AppDispatch } from '../../store';
import { APIKeySortOption, isAPIKeySortOption } from '../../types/apiKey';
import { getOrganizationId } from '../../storage/organizationId';
import {
SORT_OPTIONS_CREATED_AT_ASC,
SORT_OPTIONS_CREATED_AT_DESC,
Expand Down Expand Up @@ -134,6 +135,7 @@ export const APIKeyIndexPage: FC = memo(() => {
options && options.enabled ? options.enabled === 'false' : null;
dispatch(
listAPIKeys({
organizationId: getOrganizationId(),
environmentIds: [currentEnvironment.id],
pageSize: APIKEY_LIST_PAGE_SIZE,
cursor: String(cursor),
Expand Down

0 comments on commit 3b93269

Please sign in to comment.