mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
fix(core): fix scope resource finder (#2962)
This commit is contained in:
parent
ea7e8303c0
commit
2722704a2d
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ export default function roleScopeRoutes<T extends AuthedRouter>(
|
||||||
|
|
||||||
const resources = await findResourcesByIds(scopes.map(({ resourceId }) => resourceId));
|
const resources = await findResourcesByIds(scopes.map(({ resourceId }) => resourceId));
|
||||||
const result: ScopeResponse[] = scopes.map((scope) => {
|
const result: ScopeResponse[] = scopes.map((scope) => {
|
||||||
const resource = resources.find(({ id }) => scope.resourceId);
|
const resource = resources.find(({ id }) => id === scope.resourceId);
|
||||||
|
|
||||||
assertThat(resource, new Error(`Cannot find resource for id ${scope.resourceId}`));
|
assertThat(resource, new Error(`Cannot find resource for id ${scope.resourceId}`));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue