File size: 617 Bytes
b245237
dd73539
4986f6d
b245237
 
4986f6d
 
 
 
 
 
b245237
 
4986f6d
 
dd73539
4986f6d
dd73539
 
b245237
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from fastapi import FastAPI
from fastapi.responses import RedirectResponse

from app.graphdb.main import insert2PersonAndSetFriend, deleteFriend
from .routers import image, video, friend_request, me


app = FastAPI()

app.include_router(image.router)
app.include_router(video.router)
app.include_router(friend_request.router)
app.include_router(me.router)


@app.get("/", include_in_schema=False)
def hello():
    response = RedirectResponse(url="/docs")
    return response


@app.get("/test")
async def test():
    await insert2PersonAndSetFriend("1", "2")
    await deleteFriend("1", "2")