mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-04-30 20:50:02 +00:00
update
This commit is contained in:
parent
c8a0a21ef2
commit
3f21c2b2c2
83 changed files with 6355 additions and 0 deletions
15
server/app/controller/mcp/category_controller.py
Normal file
15
server/app/controller/mcp/category_controller.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from typing import Annotated
|
||||
from fastapi import APIRouter, Depends, Query
|
||||
from sqlmodel import Session, col, select
|
||||
|
||||
from app.component.database import session
|
||||
from app.model.mcp.category import Category, CategoryOut
|
||||
|
||||
|
||||
router = APIRouter(prefix="/mcp", tags=["Mcp Category"])
|
||||
|
||||
|
||||
@router.get("/categories", name="category list", response_model=list[CategoryOut])
|
||||
def gets(session: Session = Depends(session)):
|
||||
stmt = select(Category).where(Category.no_delete()).order_by(col(Category.priority).asc())
|
||||
return session.exec(stmt)
|
||||
Loading…
Add table
Add a link
Reference in a new issue