Reset: nicer dialog, only in the desktop apps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
GivouandClaude Opus 5.5 committed 2026-11-02 21:20:40 +01:00
1 parent 29a89af562
commit bbe8a73775
6 files changed
+60 -20

No files matched your search

+2 -2
View File
@@ -1323,8 +1323,8 @@ class App:
await self.respond_json(writer, *await self.change_pin(session, data))
return
if path == "/api/reset" and method == "POST":
if not is_app and not self.check_pin(str(data.get("pin", ""))):
await self.respond_json(writer, 400, {"error": "Wrong PIN"})
if not is_app:
await self.respond_json(writer, 403, {"error": "desktop app only"})
else:
try:
await self.reset_config()