chore: minor changes

This commit is contained in:
ourongxing
2025-10-27 16:20:57 +00:00
parent cb9b320996
commit 5a2e2a5e9c
+3 -3
View File
@@ -1,10 +1,10 @@
import process from "node:process"
import type { NewsItem } from "@shared/types"
const apiKey = process.env.PRODUCTHUNT_API_TOKEN
const token = `Bearer ${apiKey}`
export default defineSource(async () => {
if (!apiKey) {
const apiToken = process.env.PRODUCTHUNT_API_TOKEN
const token = `Bearer ${apiToken}`
if (!apiToken) {
throw new Error("PRODUCTHUNT_API_TOKEN is not set")
}
const query = `