mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-04-19 10:51:20 +00:00
Remove api keys on these endpoints for now
This commit is contained in:
parent
38f15bb861
commit
0044a72a00
@ -7,13 +7,14 @@ import appConfig from '@/config/appConfig';
|
||||
const ZAP_PRIVKEY = process.env.ZAP_PRIVKEY;
|
||||
const PLEBDEVS_API_KEY = process.env.PLEBDEVS_API_KEY;
|
||||
|
||||
// todo use cron secret????
|
||||
export default async function handler(req, res) {
|
||||
// Verify API key
|
||||
const apiKey = req.headers['authorization'];
|
||||
if (!apiKey || apiKey !== PLEBDEVS_API_KEY) {
|
||||
res.status(401).json({ error: 'Unauthorized' });
|
||||
return;
|
||||
}
|
||||
// const apiKey = req.headers['authorization'];
|
||||
// if (!apiKey || apiKey !== PLEBDEVS_API_KEY) {
|
||||
// res.status(401).json({ error: 'Unauthorized' });
|
||||
// return;
|
||||
// }
|
||||
|
||||
try {
|
||||
// Add execution time limit protection
|
||||
|
@ -6,9 +6,9 @@ const lnAddress = process.env.LIGHTNING_ADDRESS;
|
||||
const amount = 25; // Set the subscription amount in satoshis
|
||||
|
||||
export default async function handler(req, res) {
|
||||
if (req.headers.authorization !== process.env.CRON_SECRET) {
|
||||
return res.status(401).json({ error: 'Unauthorized' });
|
||||
}
|
||||
// if (req.headers.authorization !== process.env.CRON_SECRET) {
|
||||
// return res.status(401).json({ error: 'Unauthorized' });
|
||||
// }
|
||||
|
||||
if (req.method === 'GET') {
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user