Skip to content

Commit 77880e5

Browse files
committed
feat: update API routes to serve static files instead of reports
1 parent 3c367fa commit 77880e5

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const controllers = {
1515
ranks: null,
1616
geos: null,
1717
versions: null,
18-
cdn: null
18+
static: null
1919
};
2020

2121
// Helper function to dynamically import controllers
@@ -44,8 +44,7 @@ const getController = async (name) => {
4444
case 'versions':
4545
controllers[name] = await import('./controllers/versionsController.js');
4646
break;
47-
// Handles CDN-related endpoints and logic
48-
case 'cdn':
47+
case 'static':
4948
controllers[name] = await import('./controllers/cdnController.js');
5049
break;
5150
}
@@ -181,7 +180,7 @@ const handleRequest = async (req, res) => {
181180
res.end(JSON.stringify({ error: 'File path required' }));
182181
return;
183182
}
184-
const { proxyReportsFile } = await getController('cdn');
183+
const { proxyReportsFile } = await getController('static');
185184
await proxyReportsFile(req, res, filePath);
186185
} else {
187186
// 404 Not Found

terraform/dev/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ paths:
112112
responses:
113113
200:
114114
description: String
115-
/v1/reports/{filePath}:
115+
/v1/static/{filePath}:
116116
get:
117-
summary: reports
118-
operationId: getReportsFile
117+
summary: static
118+
operationId: getStaticFile
119119
parameters:
120120
- name: filePath
121121
in: path

0 commit comments

Comments
 (0)