We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 27136f0 commit f487345Copy full SHA for f487345
1 file changed
utils/createRepo.js
@@ -44,18 +44,22 @@ module.exports = async () => {
44
auto_init,
45
};
46
47
- await axios
48
- .post(`https://api.github.com/user/repos?${headers.Authorization}`, {
49
- headers: headers,
50
- body: JSON.stringify(payLoad),
51
- })
+ const options = {
+ method: "POST",
+ headers: headers,
+ data: JSON.stringify(payLoad),
+ url: `https://api.github.com/user/repos`,
52
+ };
53
+
54
+ await axios(options)
55
.then((res) => {
56
const name = "👌 DONE";
57
const msg = "Repo Successfully Created!!";
58
box(name, msg);
59
})
60
.catch((err) => {
- console.log(err);
61
+ console.log(err.response.config.headers);
62
+ console.log(err.response.data);
63
64
const name = "⚠️ WARNING";
65
const msg = "Repo Creation Failed!!";
0 commit comments