Fix sn query, cleanup

This commit is contained in:
austinkelsay 2025-02-03 17:07:54 -06:00
parent 3ec9a02bc4
commit 75b3406d33
7 changed files with 3 additions and 26 deletions

View File

@ -155,7 +155,7 @@ export default function CourseDetails({ processedEvent, paidCourse, lessons, dec
alt="course image"
src={returnImageProxy(processedEvent.image)}
fill
className="object-cover"
className="object-cover rounded-b-lg"
/>
<div className="absolute inset-0 bg-black bg-opacity-20"></div>
</div>

View File

@ -132,7 +132,7 @@ const DocumentDetails = ({ processedEvent, topics, title, summary, image, price,
alt="background image"
src={returnImageProxy(image)}
fill
className="object-cover"
className="object-cover rounded-b-lg"
/>
<div className="absolute inset-0 bg-black bg-opacity-20"></div>
</div>

View File

@ -54,7 +54,7 @@ const StackerNewsFeed = ({ searchQuery }) => {
content: item.title,
timestamp: item.createdAt,
channel: "~devs",
additionalContent: `Comments: ${item.comments.length} | Sats: ${item.sats}`
additionalContent: `Sats: ${item.sats}`
}}
searchQuery={searchQuery}
windowWidth={windowWidth}

View File

@ -4,7 +4,6 @@ import EmailProvider from "next-auth/providers/email";
import GithubProvider from "next-auth/providers/github";
import { PrismaAdapter } from "@next-auth/prisma-adapter";
import prisma from "@/db/prisma";
import nodemailer from 'nodemailer';
import { findKind0Fields } from "@/utils/nostr";
import { generateSecretKey, getPublicKey } from 'nostr-tools/pure';
import { bytesToHex } from '@noble/hashes/utils';

View File

@ -5,17 +5,8 @@ import { SimplePool } from 'nostr-tools/pool';
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;
// }
try {
// Add execution time limit protection
const startTime = Date.now();

View File

@ -18,15 +18,6 @@ export default async function handler(req, res) {
name
}
sats
comments {
id
text
createdAt
user {
name
}
sats
}
}
}
}

View File

@ -6,10 +6,6 @@ const lnAddress = process.env.LIGHTNING_ADDRESS;
const amount = 50000; // 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.method === 'GET') {
try {
const expiredSubscriptions = await findExpiredSubscriptions();