mirror of
https://github.com/stardrophere/InsightRadar.git
synced 2026-06-05 23:56:36 +08:00
optimize+注释
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
# app/api/endpoints/sources.py
|
||||
"""
|
||||
信息源模块:信息源的增删改查,供爬虫与后台管理使用
|
||||
"""
|
||||
from fastapi import APIRouter, Depends, HTTPException, status
|
||||
from sqlalchemy.orm import Session
|
||||
from typing import List
|
||||
@@ -14,7 +17,7 @@ router = APIRouter()
|
||||
|
||||
@router.post("/", response_model=InfoSourceResponse, status_code=status.HTTP_201_CREATED)
|
||||
async def create_info_source(source_in: InfoSourceCreate, db: Session = Depends(get_db)):
|
||||
"""新建一个信息源"""
|
||||
"""新建一个信息源(如微博热搜、知乎热榜等)"""
|
||||
return crud_source.create(db=db, obj_in=source_in)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user