From 4928d96d74d5bb559c83caeff33329fa629999dc Mon Sep 17 00:00:00 2001 From: Rory& Date: Fri, 21 Feb 2025 18:12:41 +0100 Subject: HomeserverEmulator changes --- .../Controllers/HEAdmin/HEAdminController.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Utilities/LibMatrix.HomeserverEmulator/Controllers/HEAdmin/HEAdminController.cs (limited to 'Utilities/LibMatrix.HomeserverEmulator/Controllers/HEAdmin') diff --git a/Utilities/LibMatrix.HomeserverEmulator/Controllers/HEAdmin/HEAdminController.cs b/Utilities/LibMatrix.HomeserverEmulator/Controllers/HEAdmin/HEAdminController.cs new file mode 100644 index 0000000..1fb3251 --- /dev/null +++ b/Utilities/LibMatrix.HomeserverEmulator/Controllers/HEAdmin/HEAdminController.cs @@ -0,0 +1,18 @@ +using LibMatrix.HomeserverEmulator.Services; +using Microsoft.AspNetCore.Mvc; + +namespace LibMatrix.HomeserverEmulator.Controllers; + +[ApiController] +[Route("/_hse/admin")] +public class HEAdminController(ILogger logger, UserStore userStore, RoomStore roomStore) : ControllerBase { + [HttpGet("users")] + public async Task> GetUsers() { + return userStore._users.ToList(); + } + + [HttpGet("rooms")] + public async Task> GetRooms() { + return roomStore._rooms.ToList(); + } +} \ No newline at end of file -- cgit 1.5.1