﻿using System;
using Nancy;

namespace RpgRooms.Website
{
    public class CreateRoomFormModule : NancyModule
    {
        public CreateRoomFormModule()
        {
            Get[Paths.CreateRoomForm()] = _ => 
                GetCreateRoomForm(Context);
        }

        static object GetCreateRoomForm(NancyContext context)
        {
            if (context == null) throw new ArgumentNullException("context");

            if (!context.IsSignedUp())
                return 403;
            
            return new CreateRoomFormResponse();
        }
    }
}