about summary refs log tree commit diff
path: root/Tests/LibMatrix.HomeserverEmulator/Controllers/HEDebug/HEDebugController.cs
blob: 0c4d8bdcdaa65515a7bd8f92c54b223af11d7150 (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;
    }
    
    [HttpGet("rooms")]
    public async Task<List<RoomStore.Room>> GetRooms() {
        return roomStore._rooms.ToList();
    }
}