3 Commits

Author SHA1 Message Date
imsyy
ec50d5ced1 🐞 fix: 修复 知乎日报 异常 #80 2024-10-15 17:24:53 +08:00
imsyy
c713d34ba1 🐞 fix: 修复 start 脚本无法正常启动 2024-09-23 16:04:54 +08:00
imsyy
c4772962f4 🐞 fix: 修复构建时显示报错 #77 2024-09-20 10:29:42 +08:00
3 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "dailyhot-api",
"version": "2.0.4",
"version": "2.0.5",
"description": "An Api on Today's Hot list",
"keywords": [
"API",
@@ -32,7 +32,7 @@
"dev": "cross-env NODE_ENV=development tsx watch --no-cache src/index.ts",
"dev:cache": "cross-env NODE_ENV=development tsx watch src/index.ts",
"build": "tsc --project tsconfig.json",
"start": "tsx src/index.ts"
"start": "cross-env NODE_ENV=development tsx dist/index.js"
},
"type": "module",
"dependencies": {

View File

@@ -44,7 +44,7 @@ const getList = async (options: Options, noCache: boolean) => {
data: list.map((v: RouterType["history"], index: number) => ({
id: index,
title: load(v.title).text().trim(),
cover: v.cover ? v.pic_share : null || null,
cover: v.cover ? v.pic_share : null,
desc: load(v.desc).text().trim(),
year: v.year,
timestamp: null,

View File

@@ -35,7 +35,7 @@ const getList = async (noCache: boolean) => {
data: list.map((v: RouterType["zhihu-daily"]) => ({
id: v.id,
title: v.title,
cover: v.images[0],
cover: v.images?.[0] ?? null,
author: v.hint,
hot: null,
timestamp: null,