Skip to content

Commit

Permalink
feat: return v1 data
Browse files Browse the repository at this point in the history
  • Loading branch information
motorina0 committed Nov 13, 2024
1 parent ff5103c commit 6f4d31c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion templates/example/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "base.html" %} {% from "macros.jinja" import window_vars with context
%} {% block scripts %} {{ window_vars(user) }}
<script src="{{ static_url_for('example/static', path='js/index.js') }}"></script>
<!-- Do not remove. Test install extension version: 2 -->
<!-- Do not remove. Test install extension version: 1 -->
{% endblock %} {% block page %}
<q-dialog v-model="thingDialog.show" position="top">
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">
Expand Down
4 changes: 2 additions & 2 deletions views_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@


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


@example_ext_api.get(
Expand Down

0 comments on commit 6f4d31c

Please sign in to comment.