Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions apps/registry/src/apis/public/slate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ export let slatesController = createHono()
let slateVersion = await slateVersionService.publishSlateVersion({
user: auth.user,
input: {
scopeIdentifier: c.req.param('scopeId'),
slateIdentifier: c.req.param('slateId'),
identifier: {
scopeIdentifier: c.req.param('scopeId'),
slateIdentifier: c.req.param('slateId')
},

versionOverride: body.version,

Expand Down
9 changes: 8 additions & 1 deletion apps/registry/src/services/slate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,20 @@ class slateServiceImpl {
}) {
let filterClause = buildSlateFilterClause(d.subRegistry, d.tenant?.oid);

let normalizedId = d.id.startsWith('@') ? d.id.slice(1) : d.id;

let slate = await db.slate.findFirst({
where: {
status: 'active',

AND: [
{
OR: [{ id: d.id }, { fullIdentifier: d.id }]
OR: [
{ id: normalizedId },
{ fullIdentifier: normalizedId },
{ id: `@${normalizedId}` },
{ fullIdentifier: `@${normalizedId}` }
]
},
filterClause
]
Expand Down
Loading