mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-26 11:56:16 +02:00
docs: add a section how to define path parameters
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user