This commit is contained in:
seb
2026-10-29 16:27:02 +01:00
parent 005b48ff66
commit 676a40d4fe
6 changed files with 50 additions and 16 deletions

View File

@@ -235,7 +235,7 @@ _none_
- Returns: `200 { message: str }`
#### Current user — `GET /auth/me`
_none_
- Returns: `200 { user: T32, googleClientId: str }`
- Returns: `200 { user: T32, googleClientId: str, schemaVersion: int }`
#### Set selected company — `PUT /auth/selected-company`
- Params: `body: { companyId: int }`
- Returns: `200 { user: T32 }`

View File

@@ -6,7 +6,7 @@ Current user
Returns the authenticated user from the session cookie and the Google client ID.
`user.picture` is the stored profile image as a base64 string when present.
Unauthenticated calls still receive `googleClientId` with 401.
Unauthenticated calls still receive `googleClientId` and `schemaVersion` with 401.
## Response `200`
@@ -21,7 +21,8 @@ Authenticated
"selectedCompanyId": 1,
"picture": "…"
},
"googleClientId": "…"
"googleClientId": "…",
"schemaVersion": 1
}
```
@@ -29,7 +30,7 @@ Authenticated
| Status | Description |
|--------|-------------|
| 401 | Unauthorized — still includes `googleClientId` for the frontend |
| 401 | Unauthorized — still includes `googleClientId` and `schemaVersion` for the frontend |
---