docs: add a section how to define path parameters
This commit is contained in:
parent
3bae5c92c2
commit
24bb2e0dc9
1 changed files with 14 additions and 0 deletions
|
|
@ -1,3 +1,17 @@
|
||||||
|
|
||||||
|
## Defining a route with path parameters
|
||||||
|
**old:**
|
||||||
|
```python
|
||||||
|
# with <>
|
||||||
|
@offlineshop_ext.route("/lnurl/<item_id>", methods=["GET"])
|
||||||
|
```
|
||||||
|
|
||||||
|
**new:**
|
||||||
|
```python
|
||||||
|
# with curly braces: {}
|
||||||
|
@offlineshop_ext.get("/lnurl/{item_id}")
|
||||||
|
```
|
||||||
|
|
||||||
## Check if a user exists and access user object
|
## Check if a user exists and access user object
|
||||||
**old:**
|
**old:**
|
||||||
```python
|
```python
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue