🐞 fix: 修复 Docker 运行出错

This commit is contained in:
imsyy
2024-06-06 16:27:01 +08:00
parent d73ca1170c
commit d4a52a6b24
6 changed files with 42 additions and 13 deletions

View File

@@ -10,8 +10,8 @@ const serveHotApi = (port: number = config.PORT) => {
fetch: app.fetch,
port,
});
logger.info(`🔥 DailyHot API 成功在端口 ${config.PORT} 上运行`);
logger.info(`🔗 Local: 👉 http://localhost:${config.PORT}`);
logger.info(`🔥 DailyHot API 成功在端口 ${port} 上运行`);
logger.info(`🔗 Local: 👉 http://localhost:${port}`);
return apiServer;
} catch (error) {
logger.error(error);

View File

@@ -31,7 +31,7 @@ const getList = async (options: Options, noCache: boolean) => {
const { type } = options;
const url = `https://www.v2ex.com/api/topics/${type}.json`;
const result = await get({ url, noCache });
const list = result.data.data.list;
const list = result.data;
return {
fromCache: result.fromCache,
updateTime: result.updateTime,

View File

@@ -30,8 +30,6 @@ const getList = async (options: Options, noCache: boolean) => {
const url = `http://www.nmc.cn/rest/findAlarm?pageNo=1&pageSize=20&signaltype=&signallevel=&province=${encodeURIComponent(province)}`;
const result = await get({ url, noCache });
const list = result.data.data.page.list;
console.log(list);
return {
fromCache: result.fromCache,
updateTime: result.updateTime,