Skip to content

Commit

Permalink
chore: repo overall update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Nov 21, 2024
1 parent a05a85d commit db13720
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/canyon-platform/app/api/sourcecode/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export async function GET(request: NextRequest) {
try {
const r = await getFileInfo(
{
projectID: projectID.split("-")[1],
projectID: projectID,
filepath: encodeURIComponent(filepath),
commitSha: sha,
},
Expand Down
17 changes: 10 additions & 7 deletions packages/canyon-platform/utils/handle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ export const handleSelect = async ({
});
}
const [coverage, sourcecode] = await Promise.all([
axios.get("/api/cov/map", {
params: {
project_id: projectID,
sha,
filepath,
},
}),
axios
.get("/api/cov/map", {
params: {
project_id: projectID,
sha,
filepath,
},
})
.then((res) => res.data),
axios
.get("/api/sourcecode", {
params: {
Expand All @@ -50,6 +52,7 @@ export const handleSelect = async ({
};
}),
]);
console.log(coverage[filepath], coverage, filepath, "coverage[filepath]");
return {
// @ts-ignore
fileCoverage: coverage[filepath],
Expand Down

0 comments on commit db13720

Please sign in to comment.