@startuml admin_email_template_get_route_after
title After - Admin Email Template API Surface Includes GET by ID

skinparam backgroundColor White
skinparam defaultFontColor Black
skinparam ArrowColor Black
skinparam componentStyle rectangle
skinparam shadowing false

actor "Admin Operator" as Admin #EAF3FF
component "AdminPlugin\n(crates/api/src/plugins/admin/mod.rs)" as AdminPlugin #D5E8D4
component "GET /admin/email-template/get\n(id query param)" as GetRoute #FFE6CC
component "get_email_template_core(...)\n(crates/api/src/plugins/admin/handlers.rs)" as CoreFn #F5F5F5
component "DatabaseAdapter::get_email_template_by_id(...)\n(memory + sqlx implementations)" as AdapterFn #DAE8FC
database "email_templates" as EmailTemplates #FFF2CC

Admin --> AdminPlugin : GET /admin/email-template/get?id=...
AdminPlugin --> GetRoute : route match + admin guard
GetRoute --> CoreFn : parse id + fetch
CoreFn --> AdapterFn : get by id
AdapterFn --> EmailTemplates : SELECT by id
EmailTemplates --> AdapterFn : row or none
AdapterFn --> CoreFn : EmailTemplate | None
CoreFn --> GetRoute : { emailTemplate: ... } | 404
GetRoute --> AdminPlugin : response + audit log
AdminPlugin --> Admin : JSON response

note right of AdminPlugin
Email template routes now:
- POST /admin/email-template/create
- GET  /admin/email-template/list
- GET  /admin/email-template/get
- POST /admin/email-template/update
- POST /admin/email-template/delete
end note

@enduml
