spanreed/Server/Controllers/RoomController.cs
2021-12-17 13:39:34 +00:00

22 lines
574 B
C#

using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using spanreed.Shared;
using spanreed.Server.Data;
namespace spanreed.Server.Controllers {
[ApiController]
[Route("[controller]")]
public class RoomController : ControllerBase {
private readonly Rooms rooms;
public RoomController(Rooms rooms) {
this.rooms = rooms;
}
public IEnumerable<string> Get()
{
string[] arr = new string[rooms.RoomSet.Count];
rooms.RoomSet.CopyTo(arr);
return arr;
}
}
}