refactor(backend): 重构动物相关 API 接口

- 更新了动物数据结构和相关类型定义
- 优化了动物列表、详情、创建、更新和删除接口
- 新增了更新动物状态接口
- 移除了与认领记录相关的接口
-调整了 API 响应结构
This commit is contained in:
ylweng
2025-08-31 23:26:25 +08:00
parent 5b5d65e072
commit cbee609e78
25 changed files with 3232 additions and 375 deletions

View File

@@ -92,6 +92,23 @@ app.get('/health', (req, res) => {
});
});
// 系统统计路由
app.get('/system-stats', (req, res) => {
const stats = {
status: 'OK',
timestamp: new Date().toISOString(),
environment: process.env.NODE_ENV || 'development',
nodeVersion: process.version,
memoryUsage: process.memoryUsage(),
uptime: process.uptime(),
cpuCount: require('os').cpus().length,
platform: process.platform,
architecture: process.arch
};
res.status(200).json(stats);
});
// API路由
app.use('/api/v1/auth', authRoutes);
app.use('/api/v1/users', userRoutes);