认证

更新当前用户的个性化设置

Changed on

按 PATCH 语义合并用户偏好(仅覆盖请求体里出现的字段,其余字段保持不变), 数据存放在 users.preferences (JSON),跨设备/浏览器自动同步。

put/auth/me/preferences

Request

  • Base URL
    /api/v1 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v1/auth/me/preferences
  • Auth
    API key in header Authorization

Request body

browser_search_instructionsstring
last_active_tenant_idinteger

LastActiveTenantID lets clients persist "after a fresh login, drop me back into this workspace" across devices. The SPA sends this after every tenant switch; POST /auth/switch-tenant records the same preference server-side. Send a positive workspace id to set / replace, or 0 to clear. Membership is validated at next login, not here. Nil = field omitted from the PATCH and stays untouched.

Response

更新后的偏好

successboolean

Example response

{
  "success": true
}

Changes