Commit Graph

34 Commits

Author SHA1 Message Date
Xyfacai
456475d593 refactor: format api page query and err result 2025-07-14 22:03:22 +08:00
Apple\Apple
dcefd7dfb4 🚀 feat(pagination): unify backend-driven pagination & improve channel tag aggregation
SUMMARY
• Migrated Token, Task, Midjourney, Channel, Redemption tables to true server-side pagination.
• Added total / page / page_size metadata in API responses; switched all affected React tables to consume new structure.
• Implemented counting helpers:
  – model/token.go CountUserTokens
  – model/task.go TaskCountAllTasks / TaskCountAllUserTask
  – model/midjourney.go CountAllTasks / CountAllUserTask
  – model/channel.go CountAllChannels / CountAllTags
• Refactored controllers (token, task, midjourney, channel) for 1-based paging & aggregated returns.
• Redesigned `ChannelsTable.js`:
  – `loadChannels`, `syncPageData`, `enrichChannels` for tag-mode grouping without recursion.
  – Fixed runtime white-screen (maximum call-stack) by removing child duplication.
  – Pagination, search, tag-mode, idSort all hot-reload correctly.
• Removed unused `log` import in controller/midjourney.go.

BREAKING CHANGES
Front-end consumers must now expect data.items / total / page / page_size from list endpoints (`/api/channel`, `/api/task`, `/api/mj`, `/api/token`, etc.).
2025-06-12 17:25:25 +08:00
1808837298@qq.com
069f2672c1 refactor: Enhance user context and quota management
- Add new context keys for user-related information
- Modify user cache and authentication middleware to populate context
- Refactor quota and notification services to use context-based user data
- Remove redundant database queries by leveraging context information
- Update various components to use new context-based user retrieval methods
2025-02-25 20:56:16 +08:00
CalciumIon
a7e1d17c3e feat: Introduce settings package and refactor constants
- Added a new `setting` package to replace the `constant` package for configuration management, improving code organization and clarity.
- Moved various configuration variables such as `ServerAddress`, `PayAddress`, and `SensitiveWords` to the new `setting` package.
- Updated references throughout the codebase to use the new `setting` package, ensuring consistent access to configuration values.
- Introduced new files for managing chat settings and midjourney settings, enhancing modularity and maintainability of the code.
2024-12-22 17:24:29 +08:00
CalciumIon
a3880d558a chore: mj 2024-07-15 22:14:30 +08:00
CalciumIon
ba27da9e2c fix: try to fix mj 2024-07-15 22:09:11 +08:00
CalciumIon
cadd8aa622 feat: only update task on master node 2024-06-26 17:23:03 +08:00
1808837298@qq.com
4eb6217bc0 feat: only update midjourney task on master node 2024-06-15 01:11:03 +08:00
1808837298@qq.com
099068f543 feat: 支持设置worker访问请求中的图片地址 2024-05-28 17:59:53 +08:00
1808837298@qq.com
234e39ddeb feat: update midjourney task info update timeout 2024-05-01 01:32:01 +08:00
CaIon
1162683b4d feat: 可设置是否转发上游mj图片地址 2024-04-18 18:02:09 +08:00
Calcium-Ion
f7a4f18aff Update midjourney.go 2024-03-30 16:26:39 +08:00
余生一个白恩
706449dede 增加上游构图失败判断 2024-03-30 13:21:05 +08:00
CaIon
614220a0fb feat: 超过一小时的任务自动失败 2024-03-14 15:16:36 +08:00
CaIon
3d10c9f090 feat: 将操作拆分成单独的模型 2024-03-13 21:19:48 +08:00
CaIon
2ad591411e feat: support shorten 2024-03-13 17:46:34 +08:00
CaIon
37c0c8ebdd feat: 初步兼容midjourney-proxy-plus 2024-03-13 15:37:01 +08:00
1808837298@qq.com
6013219f5b feat: 初步重构完成 2024-02-29 16:21:25 +08:00
1808837298@qq.com
5b18cd6b0a feat: 初步重构 2024-02-29 01:08:18 +08:00
Xyfacai
d3e070d963 fix: mj 错误处理 2024-01-14 16:17:45 +08:00
CaIon
d30b9321b2 chore: UpdateMidjourneyTaskBulk with SafeGoroutine 2024-01-12 18:38:45 +08:00
CaIon
2a9c3ac6af fix: 修复mj错误返还费用问题 2024-01-12 13:45:52 +08:00
Xyfacai
fd4ef086dc fix: 优化 mj 获取进度 2023-12-23 23:14:58 +08:00
CaIon
0fdd4fc6e3 美化绘画IU 2023-12-14 15:16:51 +08:00
CaIon
adfabaa12c fix mj fetch bug 2023-11-28 23:17:10 +08:00
luxl
3e89112b1c 绘图列表更新 2023-11-23 18:18:03 +08:00
CaIon
57d0fc3021 support base64 image 2023-11-19 18:59:35 +08:00
CaIon
de596ce90c fix mj bug 2023-11-06 02:08:12 +08:00
CaIon
f7870b1bf3 fix: fix midjourney task update bug 2023-09-22 23:32:19 +08:00
CaIon
9ab4f7a271 移除不必要的功能 2023-09-09 03:11:42 +08:00
CaIon
43be1982d7 merge 2023-09-09 01:50:41 +08:00
CaIon
fe94656260 修复多路复用bug 2023-08-31 00:44:16 +08:00
CaIon
3b0f1ae978 修改stat接口返回值 2023-08-25 00:40:11 +08:00
CaIon
8f2119e410 add epay 2023-08-14 22:16:32 +08:00