Skip to content

Commit

Permalink
fix error in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidnev Nikolaj committed Jun 27, 2019
1 parent bd8cf65 commit f700a06
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ app.add_middleware(
)


@app.get("/status", response_model=Status, status_code=HTTP_202_ACCEPTED)
@app.get("/status", response_model=Status)
def bot_status():
return bot.status


@app.post("/command")
@app.post("/command", status_code=HTTP_202_ACCEPTED)
def bot_command(message: Message):
bot.execute_command(message.dict())
```
Expand Down Expand Up @@ -120,12 +120,12 @@ app.add_event_handler("startup", bot.start)
app.add_event_handler("shutdown", bot.stop)


@app.get("/status", response_model=Status, status_code=HTTP_202_ACCEPTED)
@app.get("/status", response_model=Status)
async def bot_status():
return bot.status


@app.post("/command")
@app.post("/command", status_code=HTTP_202_ACCEPTED)
async def bot_command(message: Message):
await bot.execute_command(message.dict())
```
Expand Down
8 changes: 4 additions & 4 deletions docs/development/first-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ You must call them to be sure that the bot will work properly.

```Python3 hl_lines="4 9"
...
@app.get("/status", response_model=Status, status_code=HTTP_202_ACCEPTED)
@app.get("/status", response_model=Status)
def bot_status():
return bot.status


@app.post("/command")
@app.post("/command", status_code=HTTP_202_ACCEPTED)
def bot_command(message: Message):
bot.execute_command(message.dict())
...
Expand Down Expand Up @@ -404,12 +404,12 @@ app.add_middleware(
)


@app.get("/status", response_model=Status, status_code=HTTP_202_ACCEPTED)
@app.get("/status", response_model=Status)
def bot_status():
return bot.status


@app.post("/command")
@app.post("/command", status_code=HTTP_202_ACCEPTED)
def bot_command(message: Message):
bot.execute_command(message.dict())
```
8 changes: 4 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ app.add_middleware(
)


@app.get("/status", response_model=Status, status_code=HTTP_202_ACCEPTED)
@app.get("/status", response_model=Status)
def bot_status():
return bot.status


@app.post("/command")
@app.post("/command", status_code=HTTP_202_ACCEPTED)
def bot_command(message: Message):
bot.execute_command(message.dict())
```
Expand Down Expand Up @@ -120,12 +120,12 @@ app.add_event_handler("startup", bot.start)
app.add_event_handler("shutdown", bot.stop)


@app.get("/status", response_model=Status, status_code=HTTP_202_ACCEPTED)
@app.get("/status", response_model=Status)
async def bot_status():
return bot.status


@app.post("/command")
@app.post("/command", status_code=HTTP_202_ACCEPTED)
async def bot_command(message: Message):
await bot.execute_command(message.dict())
```
Expand Down
2 changes: 2 additions & 0 deletions scripts/build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
set -e

python -m mkdocs build

cp ./docs/index.md ./README.md

0 comments on commit f700a06

Please sign in to comment.