1
1
mirror of https://github.com/ZeroCatDev/ClassworksKV.git synced 2025-12-07 21:13:10 +00:00

13 Commits

Author SHA1 Message Date
Sunwuyuan
ab8904b549
feat: 修复POST /:key处理,确保kvStore.upsert操作为异步执行 2025-12-06 13:10:02 +08:00
Sunwuyuan
da633ca5b6
feat: 增强POST /:key处理,支持空值和JSON格式验证 2025-12-06 13:09:00 +08:00
Sunwuyuan
f985b6a11a
Update validation logic for request body
Allow empty arrays to pass validation while intercepting empty objects.
2025-12-01 20:20:17 +08:00
tempChanghong
f0de2cd59b Fix:修改语法错误 2025-12-01 16:01:20 +08:00
tempChanghong
d52ed81a29 Fix: 允许保存空数组,修复无法删除最后一条通知的Bug 2025-12-01 15:06:52 +08:00
Sunwuyuan
c545612c9c
规范代码格式 2025-11-16 16:15:05 +08:00
Sunwuyuan
87a408d904
feat: 更新/_info接口响应,优化设备信息返回逻辑 2025-11-09 14:32:22 +08:00
SunWuyuan
2ab90ffebc
feat: Implement Refresh Token system with enhanced security and user experience
- Added refresh token support in the account model with new fields: refreshToken, refreshTokenExpiry, and tokenVersion.
- Created a new token management utility (utils/tokenManager.js) for generating and verifying access and refresh tokens.
- Updated JWT utility (utils/jwt.js) to maintain backward compatibility while introducing new token generation methods.
- Enhanced middleware for JWT authentication to support new token types and automatic token refreshing.
- Expanded API endpoints in routes/accounts.js to include refresh token functionality, logout options, and token info retrieval.
- Introduced automatic token refresh mechanism in the front-end integration examples.
- Comprehensive migration checklist and documentation for the new refresh token system.
- Added database migration script to accommodate new fields in the Account table.
2025-11-02 09:48:03 +08:00
SunWuyuan
bb61e6e6f5
feat: Add AutoAuth functionality and enhance Apps API
- Introduced AutoAuth model to manage automatic authorization configurations for devices.
- Added new endpoint to obtain token via namespace and password for automatic authorization.
- Implemented functionality to set student names for student-type tokens.
- Enhanced AppInstall model to include deviceType and isReadOnly fields.
- Updated device creation to allow custom namespaces and ensure uniqueness.
- Added routes for managing AutoAuth configurations, including CRUD operations.
- Implemented checks for read-only tokens in KV operations.
- Created detailed API documentation for AutoAuth and new Apps API endpoints.
- Added migration scripts to accommodate new database schema changes.
2025-11-01 19:31:46 +08:00
SunWuyuan
02c0da037f
feat: integrate Socket.IO for real-time updates and online device management
- Added Socket.IO dependency to enable real-time communication.
- Initialized Socket.IO in the server and bound it to the HTTP server.
- Implemented functionality to allow clients to join device channels using KV tokens.
- Added endpoints to retrieve online devices and broadcast key changes.
- Enhanced existing routes to include device names in responses.
- Implemented broadcasting of key changes for KV operations.
- Updated documentation to reflect the new Socket.IO integration and usage.
2025-10-25 17:10:22 +08:00
SunWuyuan
aec482cbcb
cskv 2025-10-06 10:49:48 +08:00
SunWuyuan
7b1e224f70
继续一大堆功能实现 2025-10-03 21:22:18 +08:00
SunWuyuan
521522c1d2
更新到一半 2025-10-02 12:07:50 +08:00