feat: implement core platform features including business directory, admin dashboard, authentication, and API infrastructure
Some checks failed
Build and Push App / build (push) Failing after 16m2s
Some checks failed
Build and Push App / build (push) Failing after 16m2s
This commit is contained in:
@@ -1,24 +1,18 @@
|
||||
const { PrismaClient } = require('@prisma/client');
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
async function test() {
|
||||
console.log('Attempting to create an AnalyticsEvent...');
|
||||
async function testGeoIP(ip) {
|
||||
try {
|
||||
const event = await prisma.analyticsEvent.create({
|
||||
data: {
|
||||
type: 'TEST_MANUAL',
|
||||
path: '/test-script',
|
||||
label: 'Script Test',
|
||||
metadata: { source: 'script' }
|
||||
}
|
||||
});
|
||||
console.log('SUCCESS! Event created:', event.id);
|
||||
const response = await fetch(`http://ip-api.com/json/${ip}`);
|
||||
const data = await response.json();
|
||||
console.log(`IP: ${ip} => Country: ${data.country}, City: ${data.city}`);
|
||||
} catch (error) {
|
||||
console.error('FAILURE! Prisma Error:');
|
||||
console.error(error);
|
||||
} finally {
|
||||
await prisma.$disconnect();
|
||||
console.error(`Error for ${ip}:`, error.message);
|
||||
}
|
||||
}
|
||||
|
||||
test();
|
||||
async function run() {
|
||||
const ips = ['8.8.8.8', '41.207.160.0', '1.1.1.1'];
|
||||
for (const ip of ips) {
|
||||
await testGeoIP(ip);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
|
||||
Reference in New Issue
Block a user