Commit 764c352c authored by Kim, Subin's avatar Kim, Subin
Browse files

Merge remote-tracking branch 'origin/jiwon' into ourMaster

parents cfcaaab5 2e020222
...@@ -6,13 +6,6 @@ const config = { ...@@ -6,13 +6,6 @@ const config = {
kakaoAdminKey: 'b2dda7685c5b2990684d813e362cff07', kakaoAdminKey: 'b2dda7685c5b2990684d813e362cff07',
cookieMaxAge: 60 * 60 * 24 * 7 * 1000 cookieMaxAge: 60 * 60 * 24 * 7 * 1000
} }
// const config = {
// port: 3001,
// kakaoAdminKey: 'b2dda7685c5b2990684d813e362cff07',
// }
export default config export default config
\ No newline at end of file
// export default config
\ No newline at end of file
...@@ -43,7 +43,7 @@ const singleTest = async (req, res) => { ...@@ -43,7 +43,7 @@ const singleTest = async (req, res) => {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
}, },
body: bodyData, body: bodyData,
}) })
const resp = await response.json() const resp = await response.json()
console.log(resp) console.log(resp)
res.json({redirect_url: resp.next_redirect_pc_url}) res.json({redirect_url: resp.next_redirect_pc_url})
......
...@@ -60,7 +60,7 @@ const recommendPro = async (req, res) => { ...@@ -60,7 +60,7 @@ const recommendPro = async (req, res) => {
'products.productId': mongoose.Types.ObjectId(productId) 'products.productId': mongoose.Types.ObjectId(productId)
} }
}, },
{ "$unwind": "$products" }, { $unwind: "$products" },
{ {
$group: { $group: {
_id: "$products.productId", _id: "$products.productId",
......
...@@ -84,7 +84,7 @@ const addorder = async (req, res) => { ...@@ -84,7 +84,7 @@ const addorder = async (req, res) => {
const order = await Order.find({ userId: userId }).populate({ const order = await Order.find({ userId: userId }).populate({
path: 'products.productId', path: 'products.productId',
model: 'Product' model: 'Product'
}) }).sort({createdAt:-1})
res.status(200).json(order) res.status(200).json(order)
} catch (error) { } catch (error) {
console.log(error) console.log(error)
......
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