mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-06 18:31:00 +00:00
Fix sn query, cleanup
This commit is contained in:
parent
3ec9a02bc4
commit
75b3406d33
@ -155,7 +155,7 @@ export default function CourseDetails({ processedEvent, paidCourse, lessons, dec
|
|||||||
alt="course image"
|
alt="course image"
|
||||||
src={returnImageProxy(processedEvent.image)}
|
src={returnImageProxy(processedEvent.image)}
|
||||||
fill
|
fill
|
||||||
className="object-cover"
|
className="object-cover rounded-b-lg"
|
||||||
/>
|
/>
|
||||||
<div className="absolute inset-0 bg-black bg-opacity-20"></div>
|
<div className="absolute inset-0 bg-black bg-opacity-20"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -132,7 +132,7 @@ const DocumentDetails = ({ processedEvent, topics, title, summary, image, price,
|
|||||||
alt="background image"
|
alt="background image"
|
||||||
src={returnImageProxy(image)}
|
src={returnImageProxy(image)}
|
||||||
fill
|
fill
|
||||||
className="object-cover"
|
className="object-cover rounded-b-lg"
|
||||||
/>
|
/>
|
||||||
<div className="absolute inset-0 bg-black bg-opacity-20"></div>
|
<div className="absolute inset-0 bg-black bg-opacity-20"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -54,7 +54,7 @@ const StackerNewsFeed = ({ searchQuery }) => {
|
|||||||
content: item.title,
|
content: item.title,
|
||||||
timestamp: item.createdAt,
|
timestamp: item.createdAt,
|
||||||
channel: "~devs",
|
channel: "~devs",
|
||||||
additionalContent: `Comments: ${item.comments.length} | Sats: ${item.sats}`
|
additionalContent: `Sats: ${item.sats}`
|
||||||
}}
|
}}
|
||||||
searchQuery={searchQuery}
|
searchQuery={searchQuery}
|
||||||
windowWidth={windowWidth}
|
windowWidth={windowWidth}
|
||||||
|
@ -4,7 +4,6 @@ import EmailProvider from "next-auth/providers/email";
|
|||||||
import GithubProvider from "next-auth/providers/github";
|
import GithubProvider from "next-auth/providers/github";
|
||||||
import { PrismaAdapter } from "@next-auth/prisma-adapter";
|
import { PrismaAdapter } from "@next-auth/prisma-adapter";
|
||||||
import prisma from "@/db/prisma";
|
import prisma from "@/db/prisma";
|
||||||
import nodemailer from 'nodemailer';
|
|
||||||
import { findKind0Fields } from "@/utils/nostr";
|
import { findKind0Fields } from "@/utils/nostr";
|
||||||
import { generateSecretKey, getPublicKey } from 'nostr-tools/pure';
|
import { generateSecretKey, getPublicKey } from 'nostr-tools/pure';
|
||||||
import { bytesToHex } from '@noble/hashes/utils';
|
import { bytesToHex } from '@noble/hashes/utils';
|
||||||
|
@ -5,17 +5,8 @@ import { SimplePool } from 'nostr-tools/pool';
|
|||||||
import appConfig from '@/config/appConfig';
|
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;
|
|
||||||
|
|
||||||
// todo use cron secret????
|
|
||||||
export default async function handler(req, res) {
|
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 {
|
try {
|
||||||
// Add execution time limit protection
|
// Add execution time limit protection
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
|
@ -18,15 +18,6 @@ export default async function handler(req, res) {
|
|||||||
name
|
name
|
||||||
}
|
}
|
||||||
sats
|
sats
|
||||||
comments {
|
|
||||||
id
|
|
||||||
text
|
|
||||||
createdAt
|
|
||||||
user {
|
|
||||||
name
|
|
||||||
}
|
|
||||||
sats
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,10 +6,6 @@ const lnAddress = process.env.LIGHTNING_ADDRESS;
|
|||||||
const amount = 50000; // Set the subscription amount in satoshis
|
const amount = 50000; // 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) {
|
|
||||||
// return res.status(401).json({ error: 'Unauthorized' });
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (req.method === 'GET') {
|
if (req.method === 'GET') {
|
||||||
try {
|
try {
|
||||||
const expiredSubscriptions = await findExpiredSubscriptions();
|
const expiredSubscriptions = await findExpiredSubscriptions();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user