회원가입
const info = {
year: '1995',
job: "comedian"
};
const fullName = "Tomas Hidleston";
//회원가입 api
axios({
method: "POST",
url: "http://kdt.frontend.3rd.programmers.co.kr:5005/signup",
data: {
email: "test1@programmers.co.kr",
fullName,
password: "test1"
}
}).then(res => {
console.log(res)
}).catch(e => {
console.log(e);
})
//사용자 정보 변경 api
axios({
method: "PUT",
url: "http://kdt.frontend.3rd.programmers.co.kr:5005/settings/update-user",
data: {
fullName,
username: JSON.stringify(info)
},
headers: {
Authorization: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7Il9pZCI6IjYzYmMxMzE4MGM3NmMwNTcwMTZhOTc5MiIsImVtYWlsIjoidGVzdDFAcHJvZ3JhbW1lcnMuY28ua3IifSwiaWF0IjoxNjczMjcxMTg1fQ.YxF7PTh2677D1HK7rk16fMAQTYxhCFEudXJZ0N18mrs"
}
}).then(res => {
console.log(res)
}).catch(e => {
console.log(e);
})