-
axios.post(`${config.server_uri}/api/account/token`, {
username: username,
password: password
})
.then((res) => {
axios.defaults.headers.common['Authorization'] = `Bearer ${res.data.access}`;
axios.get(`${config.server_uri}/api/judger/token`)
.then(res => {
console.log(res);
}).catch((err) => {
console.log('[Login] judger login err');
process.exit(1);
});
}).catch(() => {
console.log('[Login] account login err');
process.exit(1);
}); Any problem of this code?
Any idea? |
Beta Was this translation helpful? Give feedback.
Answered by
ZTL-UwU
Feb 9, 2021
Replies: 1 comment
-
Oh, because I'm not a judger account.. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ZTL-UwU
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh, because I'm not a judger account..
solved