File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,16 @@ const RepositoryData: RouteDataFunc<
17
17
( ) => params . id ,
18
18
( id ) => client . getRepository ( { repositoryId : id } ) ,
19
19
)
20
- const [ apps ] = createResource ( repo , async ( repo ) => {
21
- const allAppsRes = await client . getApplications ( {
22
- scope : GetApplicationsRequest_Scope . ALL ,
23
- } )
24
- return allAppsRes . applications . filter ( ( app ) => app . repositoryId === repo . id )
25
- } )
20
+ const [ apps ] = createResource (
21
+ ( ) => params . id ,
22
+ ( id ) =>
23
+ client
24
+ . getApplications ( {
25
+ scope : GetApplicationsRequest_Scope . REPOSITORY ,
26
+ repositoryId : id ,
27
+ } )
28
+ . then ( ( r ) => r . applications ) ,
29
+ )
26
30
const hasPermission = createMemo (
27
31
( ) => ( user ( ) ?. admin || ( user . latest !== undefined && repo ( ) ?. ownerIds . includes ( user ( ) . id ) ) ) ?? false ,
28
32
)
You can’t perform that action at this time.
0 commit comments