18 lines
586 B
Text
18 lines
586 B
Text
@startuml
|
|
title Listing creation and admin approval
|
|
actor Owner
|
|
participant "Next API" as API
|
|
database Postgres as DB
|
|
actor Admin
|
|
actor User
|
|
|
|
Owner -> API: POST /api/listings\n(slug, details, images)
|
|
API -> DB: create Listing\nstatus=PENDING (or PUBLISHED if auto)
|
|
Admin -> API: GET /api/admin/pending
|
|
API -> DB: fetch pending listings
|
|
Admin -> API: POST /api/admin/listings/approve\n(action=approve|reject|remove)
|
|
API -> DB: update status, timestamps
|
|
User -> API: GET /listings/[slug]
|
|
API -> DB: fetch translation\nstatus=PUBLISHED and not removed
|
|
API --> User: render listing
|
|
@enduml
|