Files
Nexus/docs/changelog/2026-06-12-settings-push-complete-sound-default.md
2026-07-08 22:31:31 +08:00

823 B
Raw Permalink Blame History

2026-06-12 修复 push_complete_sound GET 404

摘要

GET /api/settings/push_complete_sound 在 MySQL 尚无该行时返回 404;现对已有默认值的设置项返回默认 JSON。

动机

登录后 App.vue 调用 syncPushSoundFromServer 触发 404script_exec_complete_sound 同理。

涉及文件

  • server/api/settings.pySETTING_DEFAULTS + get_setting 回退
  • tests/test_settings_sound_defaults.py

默认

key 默认
push_complete_sound beep_double
script_exec_complete_sound beep_double
theme dark

验证

venv/bin/pytest tests/test_settings_sound_defaults.py -q
# 生产(JWTGET /api/settings/push_complete_sound → 200 {"value":"beep_double",...}

迁移

无;首次 PUT 仍会 upsert 入库。