Commit 8e1da1f3 authored by Jiwon Yoon's avatar Jiwon Yoon
Browse files

reservation model 수정

parent 344fee7a
......@@ -14,13 +14,10 @@ const PaymentCompletePage = () => {
getUserInfo()
} else {
getGuestInfo()
}
}, [user])
useEffect(() => {
const tid = localStorage.getItem('tid')
approveKakaopay(tid)
}, [])
}
}, [user])
async function getGuestInfo() {
try {
......@@ -80,13 +77,13 @@ const PaymentCompletePage = () => {
const urlParams = new URLSearchParams(window.location.search);
const pg_token = urlParams.get('pg_token');
try {
if (user) {
if (user.id > 0) {
console.log(user.id)
const response = await axios.post(`/api/kakaopay/success`, {
'tid': tid,
cid: 'TC0ONETIME',
partner_order_id: 'butter_studio',
partner_user_id: '000000' + '6',
partner_user_id: '000000' + user.id,
pg_token: pg_token
})
console.log(response.data)
......
......@@ -11,10 +11,10 @@ const ReservationModel = (sequelize) => {
primaryKey: true,
autoIncrement: true,
},
movieId: {
type: DataTypes.INTEGER,
tid:{
type: DataTypes.STRING,
},
theater: {
movieId: {
type: DataTypes.INTEGER,
},
row: {
......@@ -23,9 +23,6 @@ const ReservationModel = (sequelize) => {
col: {
type: DataTypes.INTEGER,
},
timetable:{
type: DataTypes.INTEGER,
},
userType:{
type: DataTypes.STRING,
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment