about summary refs log tree commit diff
path: root/Utilities/LibMatrix.HomeserverEmulator/Controllers/HEAdmin/HEAdminController.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-02-21 18:12:41 +0100
committerRory& <root@rory.gay>2025-02-21 18:12:41 +0100
commit4928d96d74d5bb559c83caeff33329fa629999dc (patch)
tree58ad9afb0dc836b557e339c2a3520b77e7eb0825 /Utilities/LibMatrix.HomeserverEmulator/Controllers/HEAdmin/HEAdminController.cs
parentMxcUri class, other various work (diff)
downloadLibMatrix-4928d96d74d5bb559c83caeff33329fa629999dc.tar.xz
HomeserverEmulator changes
Diffstat (limited to 'Utilities/LibMatrix.HomeserverEmulator/Controllers/HEAdmin/HEAdminController.cs')
-rw-r--r--Utilities/LibMatrix.HomeserverEmulator/Controllers/HEAdmin/HEAdminController.cs18
1 files changed, 18 insertions, 0 deletions
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<HEAdminController> logger, UserStore userStore, RoomStore roomStore) : ControllerBase { + [HttpGet("users")] + public async Task<List<UserStore.User>> GetUsers() { + return userStore._users.ToList(); + } + + [HttpGet("rooms")] + public async Task<List<RoomStore.Room>> GetRooms() { + return roomStore._rooms.ToList(); + } +} \ No newline at end of file