Fix TokenResponse schema: make user field non-optional and properly typed
- Changed user field from Optional[User] to required User type - Ensures user object is always included in login response - Pydantic now properly serializes the complete user object - Frontend can now successfully retrieve response.user for localStorage
This commit is contained in:
@@ -149,7 +149,13 @@
|
||||
"Bash(curl -k -s -X POST https://192.168.84.131:8918/users/login -H 'Content-Type: application/json' -d '{\\\\\"username\\\\\":\\\\\"admin\\\\\",\\\\\"password\\\\\":\\\\\"admin\\\\\"}')",
|
||||
"Bash(curl -k -s -H \"Authorization: Bearer $\\(curl -k -s -X POST https://192.168.84.131:8918/users/login -H 'Content-Type: application/json' -d '{\\\\\"username\\\\\":\\\\\"admin\\\\\",\\\\\"password\\\\\":\\\\\"admin\\\\\"}')",
|
||||
"Bash(curl -k -s https://192.168.84.131:8918/admin/db/export)",
|
||||
"Bash(node scripts/generate-css-vars.mjs)"
|
||||
"Bash(node scripts/generate-css-vars.mjs)",
|
||||
"Bash(curl -s -X POST http://localhost:8916/users/login -H 'Content-Type: application/json' -d '{\"username\":\"admin\",\"password\":\"password\"}')",
|
||||
"Bash(curl -s -X POST http://localhost:8916/users/login -H 'Content-Type: application/json' -d '{\"username\":\"admin\",\"password\":\"admin\"}')",
|
||||
"Bash(pkill -9 -f \"uvicorn backend.main\")",
|
||||
"Bash(pkill -9 -f \"python3.*start_servers\")",
|
||||
"Bash(curl -v -X POST http://localhost:8916/users/login -H 'Content-Type: application/json' -d '{\"username\":\"admin\",\"password\":\"admin\"}')",
|
||||
"Bash(pkill -9 -f \"uvicorn\\\\|gunicorn\")"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user