From 3dfb7b81b0fe19d37a7bf1183e248ca10c56277c Mon Sep 17 00:00:00 2001 From: Rory& Date: Fri, 23 Feb 2024 11:23:27 +0000 Subject: HS emulator --- .../Controllers/HEDebug/HEDebugController.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Tests/LibMatrix.HomeserverEmulator/Controllers/HEDebug/HEDebugController.cs (limited to 'Tests/LibMatrix.HomeserverEmulator/Controllers/HEDebug/HEDebugController.cs') diff --git a/Tests/LibMatrix.HomeserverEmulator/Controllers/HEDebug/HEDebugController.cs b/Tests/LibMatrix.HomeserverEmulator/Controllers/HEDebug/HEDebugController.cs new file mode 100644 index 0000000..0c4d8bd --- /dev/null +++ b/Tests/LibMatrix.HomeserverEmulator/Controllers/HEDebug/HEDebugController.cs @@ -0,0 +1,18 @@ +using LibMatrix.HomeserverEmulator.Services; +using Microsoft.AspNetCore.Mvc; + +namespace LibMatrix.HomeserverEmulator.Controllers; + +[ApiController] +[Route("/_hsEmulator")] +public class HEDebugController(ILogger logger, UserStore userStore, RoomStore roomStore) : ControllerBase { + [HttpGet("users")] + public async Task> GetUsers() { + return userStore._users; + } + + [HttpGet("rooms")] + public async Task> GetRooms() { + return roomStore._rooms.ToList(); + } +} \ No newline at end of file -- cgit 1.4.1