fix: debug
This commit is contained in:
@@ -11,8 +11,12 @@ export default {
|
||||
|
||||
const ip = req.headers["x-forwarded-for"] || req.connection.remoteAddress
|
||||
|
||||
console.log(ip)
|
||||
|
||||
const { data } = await ipLookupService.lookupIp(ip)
|
||||
|
||||
console.log(data)
|
||||
|
||||
if (!data.country_code) {
|
||||
next()
|
||||
return
|
||||
@@ -23,6 +27,8 @@ export default {
|
||||
countries: data.country_code,
|
||||
})
|
||||
|
||||
console.log(regions)
|
||||
|
||||
// If this region exists, add it to the body of the cart creation request
|
||||
if (regions[0]) {
|
||||
req.body.region_id = regions[0]._id.toString()
|
||||
|
||||
Reference in New Issue
Block a user