feat(content+admin): home-events CRUD + comments moderation
Build backend images / build content-svc (push) Failing after 45s
Build backend images / build file-svc (push) Failing after 1m3s
Build backend images / build gateway (push) Failing after 0s
Build backend images / build identity-svc (push) Failing after 0s
Build backend images / build notification-svc (push) Failing after 1s
Build backend images / build render-svc (push) Failing after 1s
Build backend images / build studio-svc (push) Failing after 0s
Build backend images / build content-svc (push) Failing after 45s
Build backend images / build file-svc (push) Failing after 1m3s
Build backend images / build gateway (push) Failing after 0s
Build backend images / build identity-svc (push) Failing after 0s
Build backend images / build notification-svc (push) Failing after 1s
Build backend images / build render-svc (push) Failing after 1s
Build backend images / build studio-svc (push) Failing after 0s
- content-svc: home-events gains Create/Update/Delete + includeInactive list (POST/PUT/DELETE /v1/home-events, admin-gated; dates coerced to UTC) - admin /admin/home-events: full CRUD for homepage hero event banners - admin /admin/comments: list + approve/unapprove + delete (moderation) - AdminResource: optional listQuery to fetch inactive rows for admin views Fills the remaining legacy-admin gaps (home events, comments). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -103,8 +103,26 @@ public class SlidesController(CmsService svc) : ControllerBase
|
||||
public class HomePageEventsController(CmsService svc) : ControllerBase
|
||||
{
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> Get([FromQuery] Guid? tenantId = null) =>
|
||||
Ok(await svc.GetHomePageEventsAsync(tenantId));
|
||||
public async Task<IActionResult> Get([FromQuery] Guid? tenantId = null, [FromQuery] bool includeInactive = false) =>
|
||||
Ok(await svc.GetHomePageEventsAsync(tenantId, includeInactive));
|
||||
|
||||
[Authorize(Roles = "Admin")]
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> Create([FromBody] UpsertHomeEventRequest req) =>
|
||||
Ok(await svc.CreateHomeEventAsync(req));
|
||||
|
||||
[Authorize(Roles = "Admin")]
|
||||
[HttpPut("{id:guid}")]
|
||||
public async Task<IActionResult> Update(Guid id, [FromBody] UpsertHomeEventRequest req) =>
|
||||
Ok(await svc.UpdateHomeEventAsync(id, req));
|
||||
|
||||
[Authorize(Roles = "Admin")]
|
||||
[HttpDelete("{id:guid}")]
|
||||
public async Task<IActionResult> Delete(Guid id)
|
||||
{
|
||||
await svc.DeleteHomeEventAsync(id);
|
||||
return NoContent();
|
||||
}
|
||||
}
|
||||
|
||||
[ApiController]
|
||||
|
||||
Reference in New Issue
Block a user