mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-01-18 21:32:38 +01:00
docs: add a section how to define path parameters
This commit is contained in:
parent
3bae5c92c2
commit
24bb2e0dc9
@ -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
|
||||
**old:**
|
||||
```python
|
||||
|
Loading…
Reference in New Issue
Block a user