You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
589 B
15 lines
589 B
from fastapi import Depends, APIRouter, status, Query, Path, HTTPException
|
|
from internal.models import *
|
|
from internal.database import fetch_one, fetch_all, execute_query, response_success, raise_if_exists,raise_if_not_found
|
|
from dependencies import get_current_active_user
|
|
|
|
router = APIRouter(
|
|
prefix="/comlink",
|
|
tags=['链接管理']
|
|
)
|
|
# 获取列表
|
|
@router.get("/list")
|
|
async def comlink_list():
|
|
select_query = "SELECT id,linktext,linkurl,descr FROM comlinks;"
|
|
comlink_list = fetch_all(select_query)
|
|
return response_success(comlink_list, "comlink get list success")
|