refactor: remove unused GET /evaluations/feedbacks/all endpoint (#24778)
GET /evaluations/feedbacks/all returned the entire feedback table in a single response (flagged as a Medium OOM risk for admins in open-webui#22206). Its only frontend wrapper, getAllFeedbacks in src/lib/apis/evaluations/index.ts, is dead: nothing imports or calls it anywhere in the codebase. The endpoint is a redundant view-only twin of GET /evaluations/feedbacks/all/export, which is what the admin Feedbacks UI actually uses. Removes the endpoint, the now-unused FeedbackResponse import in the evaluations router, and the dead getAllFeedbacks frontend wrapper. The shared Feedbacks.get_all_feedbacks data-layer method is kept, since the live /feedbacks/all/export endpoint still uses it. Ref: open-webui#22206 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
557df60c3b
commit
92e727b1fc
@@ -10,7 +10,6 @@ from open_webui.models.feedbacks import (
|
||||
FeedbackIdResponse,
|
||||
FeedbackListResponse,
|
||||
FeedbackModel,
|
||||
FeedbackResponse,
|
||||
Feedbacks,
|
||||
FeedbackUserResponse,
|
||||
LeaderboardFeedbackData,
|
||||
@@ -295,12 +294,6 @@ async def get_feedback_model_ids(user=Depends(get_admin_user), db: AsyncSession
|
||||
return await Feedbacks.get_distinct_model_ids(db=db)
|
||||
|
||||
|
||||
@router.get('/feedbacks/all', response_model=list[FeedbackResponse])
|
||||
async def get_all_feedbacks(user=Depends(get_admin_user), db: AsyncSession = Depends(get_async_session)):
|
||||
feedbacks = await Feedbacks.get_all_feedbacks(db=db)
|
||||
return feedbacks
|
||||
|
||||
|
||||
@router.get('/feedbacks/all/ids', response_model=list[FeedbackIdResponse])
|
||||
async def get_all_feedback_ids(user=Depends(get_admin_user), db: AsyncSession = Depends(get_async_session)):
|
||||
return await Feedbacks.get_all_feedback_ids(db=db)
|
||||
|
||||
Reference in New Issue
Block a user