2022-03-03 16:36:08 +01:00
|
|
|
from fastapi import FastAPI, Request
|
|
|
|
from .wekan.api import Wekan
|
|
|
|
import json
|
2022-03-02 16:10:17 +01:00
|
|
|
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
|
|
@app.get("/")
|
|
|
|
async def root():
|
2022-03-03 16:36:08 +01:00
|
|
|
return {'message': 'Hello World'}
|
|
|
|
|
|
|
|
@app.post("/hook")
|
|
|
|
async def hook(request: Request):
|
|
|
|
r = await request.json()
|
|
|
|
# model_created = json.loads(r['body'].split("model_created: ")[1])["model"]
|
|
|
|
# return wekan.create_user(model_created["pk"])
|