about summary refs log tree commit diff
path: root/Utilities/LibMatrix.HomeserverEmulator/Controllers/HEDebug/HEDebugController.cs
blob: ce472453c4ad89d864f7555ff53cc67a64bbfc29 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using LibMatrix.HomeserverEmulator.Services;
using Microsoft.AspNetCore.Mvc;

namespace LibMatrix.HomeserverEmulator.Controllers;

[ApiController]
[Route("/_hsEmulator")]
public class HEDebugController(ILogger<HEDebugController> 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();
    }
}