Skip to content

Commit 36d542b

Browse files
committed
feat: add CDN controller and update API paths for versions and reports
1 parent 42246b0 commit 36d542b

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

src/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const controllers = {
1414
audits: null,
1515
ranks: null,
1616
geos: null,
17-
versions: null
17+
versions: null,
18+
cdn: null
1819
};
1920

2021
// Helper function to dynamically import controllers
@@ -43,6 +44,11 @@ const getController = async (name) => {
4344
case 'versions':
4445
controllers[name] = await import('./controllers/versionsController.js');
4546
break;
47+
case 'cdn':
48+
controllers[name] = await import('./controllers/cdnController.js');
49+
break;
50+
default:
51+
throw new Error(`Unknown controller: ${name}`);
4652
}
4753
}
4854
return controllers[name];

terraform/dev/main.tf

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,27 @@ paths:
105105
responses:
106106
200:
107107
description: String
108+
/v1/versions:
109+
get:
110+
summary: versions
111+
operationId: getVersions
112+
responses:
113+
200:
114+
description: String
115+
/v1/reports/{filePath}:
116+
get:
117+
summary: reports
118+
operationId: getReportsFile
119+
parameters:
120+
- name: filePath
121+
in: path
122+
required: true
123+
type: string
124+
responses:
125+
200:
126+
description: String
127+
schema:
128+
type: string
108129
EOF
109130
)
110131
}

0 commit comments

Comments
 (0)