web3.db-fileconnector
Version:
GraphQL System Built on web3 technologies. Web3.DB is an open database built on top of web3 technologies. It is a decentralized, open-source database that allows users to store and query data in a secure and efficient manner. The system is designed to be
19 lines (16 loc) • 550 B
text/typescript
import { NextApiRequest, NextApiResponse } from 'next';
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
if (req.method !== 'GET') {
res.setHeader('Allow', ['GET']);
return res.status(405).end(`Method ${req.method} Not Allowed`);
}
try {
// Return empty admins list for now - implement your admin logic here
res.status(200).json({
admins: []
});
} catch (error) {
console.error('Admin fetch error:', error);
res.status(500).json({ error: 'Internal server error' });
}
}