Skip to content

Commit

Permalink
fix: Release metadata keys returns array string
Browse files Browse the repository at this point in the history
  • Loading branch information
adityachoudhari26 committed Oct 19, 2024
1 parent 77b589d commit 60e15a7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ export const MetadataConditionRender: React.FC<
<Button
variant="ghost"
size="sm"
key={k.key}
key={k}
className="w-full rounded-none text-left"
onClick={() => {
setKey(k.key);
setKey(k);
setOpen(false);
}}
>
<div className="w-full">{k.key}</div>
<div className="w-full">{k}</div>
</Button>
))}
</PopoverContent>
Expand Down
18 changes: 11 additions & 7 deletions packages/api/src/router/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,13 +495,17 @@ export const releaseRouter = createTRPCRouter({
.innerJoin(workspace, eq(system.workspaceId, workspace.id));

if (input.systemSlug != null)
return baseQuery.where(
and(
eq(system.slug, input.systemSlug),
eq(workspace.slug, input.workspaceSlug),
),
);
return baseQuery
.where(
and(
eq(system.slug, input.systemSlug),
eq(workspace.slug, input.workspaceSlug),
),
)
.then((r) => r.map((row) => row.key));

return baseQuery.where(eq(workspace.slug, input.workspaceSlug));
return baseQuery
.where(eq(workspace.slug, input.workspaceSlug))
.then((r) => r.map((row) => row.key));
}),
});

0 comments on commit 60e15a7

Please sign in to comment.