Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
make tags and groups optional
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Kracht <[email protected]>
  • Loading branch information
stefan-kracht committed Dec 22, 2023
1 parent a5eafd4 commit 73913a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/api/gateway/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ const ConsumerSchema = z.object({
username: z.string(),
password: z.string(),
api_key: z.string(),
tags: z.array(z.string()),
groups: z.array(z.string()),
tags: z.array(z.string()).nullable(),
groups: z.array(z.string()).nullable(),
});

export type ConsumerSchemaType = z.infer<typeof ConsumerSchema>;
Expand Down
4 changes: 2 additions & 2 deletions src/pages/namespace/Gateway/Consumers/Table/Row/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const Row: FC<RowProps> = ({ consumer }) => (
</TableCell>
<TableCell>
<div className="flex flex-wrap gap-1">
{consumer.groups.map((group) => (
{consumer.groups?.map((group) => (
<Badge key={group} variant="outline">
{group}
</Badge>
Expand All @@ -33,7 +33,7 @@ export const Row: FC<RowProps> = ({ consumer }) => (
</TableCell>
<TableCell>
<div className="flex flex-wrap gap-1">
{consumer.tags.map((tag) => (
{consumer.tags?.map((tag) => (
<Badge key={tag} variant="outline">
{tag}
</Badge>
Expand Down

0 comments on commit 73913a4

Please sign in to comment.