Reset: nicer dialog, only in the desktop apps
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
29a89af562
commit
bbe8a73775
6 files changed
+60
-20
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user