Skip to content

Commit da75028

Browse files
fiixing github new api bug
1 parent e770e9a commit da75028

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pages/perfil.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ for (const key in categories) {
580580
const username = (<HTMLInputElement>document.getElementById("github-username")).value;
581581
const data = createProfileData();
582582
const encodedFileData = encodeURIComponent(JSON.stringify(data));
583-
const githubQueryLink = `https://github.com/${username}/${username}/new/main/cucoders_data/new?value=${encodedFileData}&filename=profile-data.json`;
583+
const githubQueryLink = `https://github.com/${username}/${username}/new/main/cucoders_data?value=${encodedFileData}&filename=profile-data.json`;
584584
window.open(githubQueryLink);
585585
}
586586

@@ -635,12 +635,12 @@ for (const key in categories) {
635635
async function setLinkAttr(username, id, file_name, newFileContent = "") {
636636
const encodedFileData = encodeURIComponent(newFileContent);
637637
let rawUrl = `https://raw.githubusercontent.com/${username}/${username}/main/cucoders_data/${file_name}`;
638-
let newUrl = `https://github.com/${username}/${username}/new/main/cucoders_data/new?value=${encodedFileData}&filename=${file_name}`;
638+
let newUrl = `https://github.com/${username}/${username}/new/main/cucoders_data?value=${encodedFileData}&filename=${file_name}`;
639639
let editUrl = `https://github.com/${username}/${username}/edit/main/cucoders_data/${file_name}`;
640640

641641
if (id == "overview") {
642642
rawUrl = `https://raw.githubusercontent.com/${username}/${username}/main/README.md`;
643-
newUrl = `https://github.com/${username}/${username}/new/main/new?value=${encodedFileData}&filename=README.md`;
643+
newUrl = `https://github.com/${username}/${username}/new/main?value=${encodedFileData}&filename=README.md`;
644644
editUrl = `https://github.com/${username}/${username}/edit/main/README.md`;
645645
}
646646

0 commit comments

Comments
 (0)