Skip to content

Commit

Permalink
Remove dead code around node_version
Browse files Browse the repository at this point in the history
  • Loading branch information
benjreinhart committed Jul 15, 2024
1 parent 6445865 commit a095cdc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
5 changes: 0 additions & 5 deletions packages/api/server/http.mts
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,6 @@ router.delete('/secrets/:name', cors(), async (req, res) => {
return res.json({ result: updated });
});

router.options('/node_version', cors());
router.get('/node_version', cors(), async (_req, res) => {
return res.json({ result: process.version });
});

type NpmSearchResult = {
package: {
name: string;
Expand Down
12 changes: 0 additions & 12 deletions packages/web/src/lib/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,18 +300,6 @@ export async function deleteSecret(request: DeleteSecretRequestType) {
return response.json();
}

export async function getNodeVersion() {
const response = await fetch(API_BASE_URL + '/node_version', {
headers: { 'content-type': 'application/json' },
});

if (!response.ok) {
console.error(response);
throw new Error('Request failed');
}
return response.json();
}

// NPM package search, has to happen on the server given CORS restrictions
export async function searchNpmPackages(query: string, size: number) {
if (query === '') {
Expand Down

0 comments on commit a095cdc

Please sign in to comment.