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 ZAP_PRIVKEY = process.env.ZAP_PRIVKEY;
|
||||||
const PLEBDEVS_API_KEY = process.env.PLEBDEVS_API_KEY;
|
const PLEBDEVS_API_KEY = process.env.PLEBDEVS_API_KEY;
|
||||||
|
|
||||||
|
// todo use cron secret????
|
||||||
export default async function handler(req, res) {
|
export default async function handler(req, res) {
|
||||||
// Verify API key
|
// Verify API key
|
||||||
const apiKey = req.headers['authorization'];
|
// const apiKey = req.headers['authorization'];
|
||||||
if (!apiKey || apiKey !== PLEBDEVS_API_KEY) {
|
// if (!apiKey || apiKey !== PLEBDEVS_API_KEY) {
|
||||||
res.status(401).json({ error: 'Unauthorized' });
|
// res.status(401).json({ error: 'Unauthorized' });
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Add execution time limit protection
|
// Add execution time limit protection
|
||||||
|
@ -6,9 +6,9 @@ const lnAddress = process.env.LIGHTNING_ADDRESS;
|
|||||||
const amount = 25; // Set the subscription amount in satoshis
|
const amount = 25; // Set the subscription amount in satoshis
|
||||||
|
|
||||||
export default async function handler(req, res) {
|
export default async function handler(req, res) {
|
||||||
if (req.headers.authorization !== process.env.CRON_SECRET) {
|
// if (req.headers.authorization !== process.env.CRON_SECRET) {
|
||||||
return res.status(401).json({ error: 'Unauthorized' });
|
// return res.status(401).json({ error: 'Unauthorized' });
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (req.method === 'GET') {
|
if (req.method === 'GET') {
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user