Initial commit
This commit is contained in:
31
src/app/webhook-logs/page.tsx
Normal file
31
src/app/webhook-logs/page.tsx
Normal file
@ -0,0 +1,31 @@
|
||||
import Link from 'next/link'
|
||||
import { redirect } from 'next/navigation'
|
||||
import { isAuthenticated } from '@/lib/auth'
|
||||
import { readJsonFile } from '@/lib/storage'
|
||||
|
||||
export default async function WebhookLogsPage() {
|
||||
if (!await isAuthenticated()) {
|
||||
redirect('/login')
|
||||
}
|
||||
|
||||
const logs = readJsonFile<any[]>('webhook-logs.json', [])
|
||||
|
||||
return (
|
||||
<div className="wrap">
|
||||
<div className="top">
|
||||
<div>
|
||||
<h1>Webhook Logs</h1>
|
||||
<p>Semua log webhook masuk, outgoing, dan status ada di sini.</p>
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: 10 }}>
|
||||
<Link className="btn" href="/settings">Settings</Link>
|
||||
<Link className="btn" href="/test">Halaman Test</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="card">
|
||||
<pre>{JSON.stringify(logs.slice().reverse(), null, 2)}</pre>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user