Skip to content

Commit d6b7cca

Browse files
committed
Removed unused code
1 parent 4ecd804 commit d6b7cca

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

src/lib/server/api/v2/admin_api.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,6 @@ import { getLogger } from '$lib/server/logger.js';
44

55
const 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
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
import { listUsers } from '$lib/server/api/auth_api.js';
2-
import { listProjects } from '$lib/server/api/v2/admin_api.js';
32
import { getLogger } from '$lib/server/logger.js';
43

54
const logger = getLogger('admin jobs page [v2]');
65

76
export 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
}

0 commit comments

Comments
 (0)