lomavuokraus/docs/plantuml/listing-removal.puml
2025-11-24 17:31:21 +02:00

18 lines
630 B
Text

@startuml
title Listing removal by owner or moderator
actor Owner
participant "Next API" as API
database Postgres as DB
actor Moderator
Owner -> API: POST /api/listings/remove (listingId)
API -> DB: verify owner or moderator\nfetch listing
API -> DB: set status=REMOVED\npublished=false\nremovedAt/by
Moderator -> API: POST /api/admin/listings/approve\n(action=remove)
API -> DB: same status change if via admin path
Owner -> API: GET /api/listings/mine
API -> DB: fetch listings for owner (includes REMOVED)
Public -> API: GET /listings/[slug]
API -> DB: filter out removed listings
API --> Public: not found if removed
@enduml