From 78fcec7263a48940f8bd906a2a86ba0edea5c2e1 Mon Sep 17 00:00:00 2001
From: Alexa <53471801+Alexa-RR@users.noreply.github.com>
Date: Wed, 3 Jun 2026 01:38:09 +0300
Subject: [PATCH] Add v2 API endpoints for inventions and messages: implement
new routes for retrieving user inventions and sending messages to enhance API
versioning support
---
.../Controllers/API/Inventions/InventionsController.cs | 1 +
.../Controllers/API/Messages/V2/MessagesController.cs | 5 ++---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/DorkNet.Server/Controllers/API/Inventions/InventionsController.cs b/DorkNet.Server/Controllers/API/Inventions/InventionsController.cs
index 54b5816..f5b5aad 100644
--- a/DorkNet.Server/Controllers/API/Inventions/InventionsController.cs
+++ b/DorkNet.Server/Controllers/API/Inventions/InventionsController.cs
@@ -73,6 +73,7 @@ public class InventionsController(
/// GetLocalPlayerInventions — same as Saved but
/// at v1 path. Watch hits both depending on tab.
[HttpGet("api/inventions/v1/mine")]
+ [HttpGet("api/inventions/v2/mine")]
[Authorize]
public Task Mine() => Saved(100);
diff --git a/DorkNet.Server/Controllers/API/Messages/V2/MessagesController.cs b/DorkNet.Server/Controllers/API/Messages/V2/MessagesController.cs
index c86b26c..dd5064a 100644
--- a/DorkNet.Server/Controllers/API/Messages/V2/MessagesController.cs
+++ b/DorkNet.Server/Controllers/API/Messages/V2/MessagesController.cs
@@ -475,9 +475,8 @@ public class MessagesController(
/// long), Type (int), Data (string), RoomId
/// (optional long). KEBJPIGKGOI.txt:1456-1478 shows the sibling
/// sendMultiple path uses ToPlayerIds (plural) — same
- /// other fields. v1 and v2 of /send are protocol-identical
- /// so we accept both.
- [HttpPost("/api/messages/v1/send")]
+ /// other fields. The older v1/send route is handled above
+ /// by .
[HttpPost("/api/messages/v2/send")]
[Consumes("application/x-www-form-urlencoded", "multipart/form-data", "application/json")]
public async Task SendSingle(