diff --git a/src/utils/github.js b/src/utils/github.js index f68257a..537e72b 100644 --- a/src/utils/github.js +++ b/src/utils/github.js @@ -92,8 +92,9 @@ const createRepository = async () => { type: 'input', validate, }); - const API_URL = `https://api.github.com/user/repos?access_token=${userToken}`; + const API_URL = `https://api.github.com/user/repos`; + axios.defaults.headers.common['Authorization'] = `token ${userToken}`; // Create a new repository. try { await axios.post(API_URL, { name: 'teachcode-solutions' });