Posts API: user posts page, 201 on create, userLogin, deprecate old routes
- GET /api/v1/users/{userId}/posts returns Page<PostResponse> (owner sees unpublished)
- POST /api/v1/posts returns 201 with the created PostResponse and Location
- PostResponse.userLogin; userEmail kept with the same value as deprecated
- GET /api/v1/posts/{userId} and /search?city= marked deprecated; search is paged
- CORS exposes Retry-After and Location to the frontend
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,13 @@ public class PostResponse {
|
||||
private PostType type;
|
||||
private PostStatus status;
|
||||
private LocalDateTime createdAt;
|
||||
/** Логин автора. */
|
||||
private String userLogin;
|
||||
/**
|
||||
* Тот же логин под старым (ошибочным) именем — для клиентов, которые ещё
|
||||
* читают userEmail. Удалить после перехода фронта на userLogin.
|
||||
*/
|
||||
@Deprecated
|
||||
private String userEmail;
|
||||
private String phone;
|
||||
private List<String> images;
|
||||
|
||||
Reference in New Issue
Block a user