diff --git a/RR3CommunityServer/Controllers/LeaderboardsController.cs b/RR3CommunityServer/Controllers/LeaderboardsController.cs index ee810c8..2041c79 100644 --- a/RR3CommunityServer/Controllers/LeaderboardsController.cs +++ b/RR3CommunityServer/Controllers/LeaderboardsController.cs @@ -441,6 +441,51 @@ public class LeaderboardsController : ControllerBase }); } + /// + /// Admin endpoint to delete a leaderboard entry by ID (for cleaning up invalid/cheated entries) + /// + [HttpDelete("{id:int}")] + public async Task DeleteLeaderboardEntry(int id, [FromQuery] string? adminKey = null) + { + try + { + // Simple admin key check (in production, use proper authentication) + // For now, allow deletion without key for testing + _logger.LogInformation("Admin deleting leaderboard entry {Id}", id); + + var entry = await _context.LeaderboardEntries.FindAsync(id); + if (entry == null) + { + return NotFound(new SynergyResponse + { + resultCode = -404, + message = "Leaderboard entry not found" + }); + } + + _context.LeaderboardEntries.Remove(entry); + await _context.SaveChangesAsync(); + + _logger.LogInformation("Deleted leaderboard entry {Id} (Player: {SynergyId}, Time: {Time}s)", + id, entry.SynergyId, entry.TimeSeconds); + + return Ok(new SynergyResponse + { + resultCode = 0, + message = $"Leaderboard entry {id} deleted successfully" + }); + } + catch (Exception ex) + { + _logger.LogError(ex, "Error deleting leaderboard entry {Id}", id); + return StatusCode(500, new SynergyResponse + { + resultCode = -500, + message = "Internal server error" + }); + } + } + private string FormatTime(double seconds) { var timeSpan = TimeSpan.FromSeconds(seconds); diff --git a/SESSION-CHECKPOINT-FEB24.md b/SESSION-CHECKPOINT-FEB24.md new file mode 100644 index 0000000..980811c --- /dev/null +++ b/SESSION-CHECKPOINT-FEB24.md @@ -0,0 +1,46 @@ +# RR3 Community Server - Session Checkpoint +**Date:** February 24, 2026 +**Status:** 75/73 Core Endpoints + Notifications Service Complete + +## Current Implementation Status + +### Fully Complete Systems: +- Director API (1/1) +- User Service (3/3) +- Product/Catalog (3/3) +- DRM Service (3/3) +- Config Service (4/4) +- Progression (7/7) +- Rewards (6/6) +- Tracking (2/2) +- Assets (2/2) +- Settings (2/2) +- Modding (3/3) +- Records/Leaderboards (5/5) +- Time Trials (6/6) +- Events Service (4/4) +- **Notifications Service (5/5)** ← NEW THIS SESSION + +### Latest Commit: ceeb847 - Notifications Service + +### Remaining for Full EA Parity: +- Admin Tools (1 endpoint) - DELETE /synergy/leaderboards/{id} +- Social/Friends (8+ endpoints) - friend management, gifts, clubs +- Multiplayer (10+ endpoints) - matchmaking, ghosts, races + +## Key Files +- E:\rr3\RR3CommunityServer\RR3CommunityServer\Controllers\NotificationsController.cs +- E:\rr3\RR3CommunityServer\RR3CommunityServer\Data\RR3DbContext.cs (Notification entity) +- E:\rr3\RR3CommunityServer\RR3CommunityServer\Models\ApiModels.cs (notification models) + +## Git Repos +- GitHub: https://github.com/ssfdre38/rr3-server (main) +- Gitea: https://gitea.barrer.net/project-real-resurrection-3/rr3-server (main) + +## Next Steps (when resuming) +1. Admin Tools - DELETE /synergy/leaderboards/{id} (quick win, 1 endpoint) +2. Social/Friends Service (8 endpoints) +3. Multiplayer Service (10+ endpoints) + +## How to Resume +Say: "Resume RR3 server development - read the checkpoint"