Skip to content

Commit a4d5e76

Browse files
authored
Merge pull request #836 from fractal-analytics-platform/cleanup-unused-code
Cleanup unused code
2 parents aff850c + 0228f07 commit a4d5e76

File tree

6 files changed

+12
-35
lines changed

6 files changed

+12
-35
lines changed

components/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sandbox/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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
}

tasks-list/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)