Skip to content

Commit

Permalink
fix: lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddhi132 committed Oct 15, 2024
1 parent 14f1283 commit 3899cd5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion libs/movex-server/src/lib/movex-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,15 @@ export const movexServer = <TDefinition extends MovexDefinition>(

const ridObj = toResourceIdentifierObj(rawRid);

if (!isOneOf(ridObj.resourceType, objectKeys(definition.resources))) {
if (
!isOneOf(
ridObj.resourceType,
objectKeys(definition.resources) as Extract<
keyof TDefinition['resources'],
string
>[]
)
) {
return res.sendStatus(400); // Bad Request
}

Expand Down

0 comments on commit 3899cd5

Please sign in to comment.