webapi-last-tag-uid #58

Open
stefank wants to merge 3 commits from webapi-last-tag-uid into main
Member
No description provided.
stefank added 2 commits 2025-12-16 21:42:12 +00:00
- Reset the app idle timer when interacting with the webapp, so that the
  device does not turn off while the web ui is used.

- Handle denying put/post while playback is active centrally in the
  before_request handler, so that it does not need to be copy/pasted
  into every request handler.

Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
feat: last connected tag uid available at /api/v1/last_tag_uid
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 4m39s
Check code formatting / Check-C-Format (push) Successful in 8s
Check code formatting / Check-Python-Flake8 (push) Successful in 10s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 9s
Run pytests / Check-Pytest (push) Successful in 11s
e2f9287ebd
matthias requested changes 2025-12-16 21:57:15 +00:00
Dismissed
@@ -62,0 +71,4 @@
@webapp.route('/api/v1/last_tag_uid', methods=['GET'])
async def last_tag_uid_get(request):
tag, _ = nfc.get_last_uid()
return "No tag present" if tag is None else tag
Owner

I would prefer it if the api returned json, e.g. null for none, tag id as string or array if tag exists.

I would prefer it if the api returned json, e.g. null for none, tag id as string or array if tag exists.
matthias marked this conversation as resolved
stefank added 1 commit 2025-12-16 22:13:10 +00:00
always return content type application/json
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 4m36s
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 10s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
Run pytests / Check-Pytest (push) Successful in 10s
32bf6a8d68
matthias approved these changes 2025-12-17 17:07:55 +00:00
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 4m36s
Check code formatting / Check-C-Format (push) Successful in 7s
Required
Details
Check code formatting / Check-Python-Flake8 (push) Successful in 10s
Required
Details
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Required
Details
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
Required
Details
Run pytests / Check-Pytest (push) Successful in 10s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin webapi-last-tag-uid:webapi-last-tag-uid
git checkout webapi-last-tag-uid
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TonBERRY/tonberry-pico#58