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;
        }
    }
}