Encode URI component to fix 404

This commit is contained in:
Justin Hutchings
2024-03-03 01:15:16 +00:00
parent f87cc241f7
commit e16e218fdc
3 changed files with 4 additions and 4 deletions
Generated Vendored
+1 -1
View File
@@ -1047,7 +1047,7 @@ function getDepsDevProjectData(projectKeyId) {
return __awaiter(this, void 0, void 0, function* () {
try {
core.debug(`Getting deps.dev project data for ${projectKeyId}`);
const url = `${depsDevAPIRoot}//v3alpha/projects/${projectKeyId}`;
const url = `${depsDevAPIRoot}//v3alpha/projects/${encodeURIComponent(projectKeyId)}`;
const response = yield fetch(url);
if (response.ok) {
const data = yield response.json();
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -49,11 +49,11 @@ async function getDepsDevData(
}
async function getDepsDevProjectData(
projectKeyId: String
projectKeyId: string
): Promise<DepsDevProject> {
try {
core.debug(`Getting deps.dev project data for ${projectKeyId}`)
const url = `${depsDevAPIRoot}//v3alpha/projects/${projectKeyId}`
const url = `${depsDevAPIRoot}//v3alpha/projects/${encodeURIComponent(projectKeyId)}`
const response = await fetch(url)
if (response.ok) {
const data = await response.json()