grok2api icon indicating copy to clipboard operation
grok2api copied to clipboard

bug: /v1/admin/tokens接口报错,找到get_config

Open wcm1987 opened this issue 8 months ago • 1 comments

问题描述

这次合并将from app.core.config import get_config 去掉了,导致运行时调用到 v1/admin/tokens会报错

复现步骤

1:token管理页刷新

预期行为

无

实际行为

无

部署方式

本地 uv run

版本/提交号

5088d0a29fd47ae574cf39ef292afe919c7b9497

相关日志/报错

File "/Users/wcm/github/grok2api/app/api/v1/admin/token.py", line 53, in get_tokens
    consumed_mode = get_config("token.consumed_mode_enabled", False)

NameError: name 'get_config' is not defined
[ERROR] Application callable raised an exception

请求样例(可选)


wcm1987 avatar Mar 17 '26 11:03 wcm1987

Hey! I may be able to help with this bug.

I build custom fixes for Python projects and automation systems.

If you'd like help resolving this issue quickly feel free to reach out.

Happy to take a look 👍

FocusMode-coder avatar Mar 17 '26 11:03 FocusMode-coder