File tree Expand file tree Collapse file tree 2 files changed +0
-23
lines changed Expand file tree Collapse file tree 2 files changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -4,26 +4,6 @@ import { getLogger } from '$lib/server/logger.js';
44
55const logger = getLogger ( 'admin API [v2]' ) ;
66
7- /**
8- * Fetches the list of projects from the server
9- * @param {typeof fetch } fetch
10- * @returns {Promise<import('fractal-components/types/api').ProjectV2[]> }
11- */
12- export async function listProjects ( fetch ) {
13- logger . debug ( 'Fetching the list of projects' ) ;
14- const response = await fetch ( `${ env . FRACTAL_SERVER_HOST } /admin/v2/project/` , {
15- method : 'GET' ,
16- credentials : 'include'
17- } ) ;
18-
19- if ( ! response . ok ) {
20- logger . error ( 'Unable to fetch the list of projects' ) ;
21- await responseError ( response ) ;
22- }
23-
24- return await response . json ( ) ;
25- }
26-
277/**
288 * Request to impersonate user
299 * @param {typeof fetch } fetch
Original file line number Diff line number Diff line change 11import { listUsers } from '$lib/server/api/auth_api.js' ;
2- import { listProjects } from '$lib/server/api/v2/admin_api.js' ;
32import { getLogger } from '$lib/server/logger.js' ;
43
54const logger = getLogger ( 'admin jobs page [v2]' ) ;
65
76export async function load ( { fetch } ) {
87 logger . trace ( 'Loading admin jobs page' ) ;
98
10- const projects = await listProjects ( fetch ) ;
119 const users = await listUsers ( fetch ) ;
1210
1311 return {
14- projects,
1512 users
1613 } ;
1714}
You can’t perform that action at this time.
0 commit comments