Commit Graph

21 Commits

Author SHA1 Message Date
SlimusMinus
ee5fb4e0e0 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>
2026-10-20 11:50:05 +03:00
SlimusMinus
6e001fbc41 Fix post deletion, moderation races and cache leftovers
- PostService.delete did not remove favorites (FK without cascade -> 500 once a
  post was favorited) or chat links; owner, admin and nightly cleanup now share
  PostDeletionService, which deletes MinIO files only after commit. The nightly
  job also removes the images of expired posts.
- Moderation reads a snapshot in a short transaction, calls AI outside of it and
  applies the verdict only if the post is still in MODERATION and unchanged, so
  an edit made during a check can no longer go live unmoderated. Storage/AI
  outages keep the post in MODERATION instead of rejecting it.
- Posts without a category broke PostMapper with an NPE; title/phone/reward and
  address are checked against column sizes; a long address no longer overflows
  posts.city; Nominatim outages fall back to the address instead of 503.
- Favorites list hides posts that are back in moderation or rejected.
- Statistics counters use atomic UPDATEs instead of read-modify-write.
- Removed MapCacheService: its version key was bumped but never read.
- hibernate.default_batch_fetch_size=50 removes N+1 on images/users; show-sql
  is off by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 01:02:12 +03:00
SlimusMinus
96b4be5e6f fixed search and add hints 2026-10-18 23:46:13 +03:00
SlimusMinus
870739f45f added posts on feed and posts on map 2026-09-29 01:03:54 +03:00
SlimusMinus
5b06b420ef added reward text 2026-09-10 01:02:03 +03:00
SlimusMinus
ddebb5cf93 added find post by id on map 2026-08-27 01:31:50 +03:00
SlimusMinus
13ed934c60 fixed web-socket and add rewards on post 2026-08-12 00:41:31 +03:00
SlimusMinus
e7dfef7327 added filter by city 2026-08-05 00:52:00 +03:00
SlimusMinus
2468c26b84 fixed controllers 2026-07-31 01:08:53 +03:00
SlimusMinus
a6fb187212 added ai-moderation image and text 2026-07-29 00:56:32 +03:00
SlimusMinus
97f28b9eca added filter on title and description on post 2026-07-06 00:47:07 +03:00
SlimusMinus
280525ee6e added many images in post 2026-07-01 00:26:11 +03:00
SlimusMinus
1aee780ba1 added role for posts 2026-06-30 00:29:13 +03:00
SlimusMinus
ec5cc6cedd added scheduler for delete old or found posts 2026-06-25 00:48:55 +03:00
SlimusMinus
c49f2d108b added reviews 2026-06-23 00:09:57 +03:00
SlimusMinus
bafb636cbe added security and fix edit profile 2026-06-18 00:22:50 +03:00
SlimusMinus
c68cdf1c3e added card on post and feed 2026-06-04 00:32:51 +03:00
SlimusMinus
723e92baf1 added image for post 2026-06-01 01:57:16 +03:00
SlimusMinus
90016d2cd6 added get and create post 2026-05-07 01:08:29 +03:00
SlimusMinus
263242e469 start backend 2026-03-26 00:21:30 +03:00
SlimusMinus
611b1c82ad added start backend 2026-03-24 00:34:04 +03:00