Skip to content

Commit 6f4d31c

Browse files
committed
feat: return v1 data
1 parent ff5103c commit 6f4d31c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

templates/example/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends "base.html" %} {% from "macros.jinja" import window_vars with context
22
%} {% block scripts %} {{ window_vars(user) }}
33
<script src="{{ static_url_for('example/static', path='js/index.js') }}"></script>
4-
<!-- Do not remove. Test install extension version: 2 -->
4+
<!-- Do not remove. Test install extension version: 1 -->
55
{% endblock %} {% block page %}
66
<q-dialog v-model="thingDialog.show" position="top">
77
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">

views_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616

1717
@example_ext_api.get("/test/{example_data}", description="Example API endpoint")
18-
async def api_example(example_data: str) -> list[Example]:
18+
async def api_example(example_data: str) -> Example:
1919
if example_data != "00000000":
2020
raise HTTPException(
2121
status_code=HTTPStatus.BAD_REQUEST,
2222
detail="Invalid example data",
2323
)
2424
# Do some python things and return the data
25-
return [Example(id="1", wallet=example_data), Example(id="2", wallet=example_data)]
25+
return Example(id="1", wallet=example_data)
2626

2727

2828
@example_ext_api.get(

0 commit comments

Comments
 (0)