mirror of
https://github.com/stardrophere/InsightRadar.git
synced 2026-06-05 23:56:36 +08:00
backend 去ai化
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
# app/api/endpoints/sources.py
|
||||
"""
|
||||
信息源模块:信息源的增删改查,供爬虫与后台管理使用
|
||||
"""
|
||||
from fastapi import APIRouter, Depends, HTTPException, status
|
||||
from sqlalchemy.orm import Session
|
||||
from typing import List
|
||||
@@ -43,6 +39,4 @@ async def update_info_source(source_id: int, source_in: InfoSourceUpdate, db: Se
|
||||
source = crud_source.get(db=db, source_id=source_id)
|
||||
if not source:
|
||||
raise HTTPException(status_code=404, detail="该信息源不存在")
|
||||
|
||||
# 直接把查出来的数据库对象和前端传来的 Pydantic 对象丢给 CRUD 处理
|
||||
return crud_source.update(db=db, db_obj=source, obj_in=source_in)
|
||||
|
||||
Reference in New Issue
Block a user