
namespace AyaNova.Api.ControllerHelpers
{


    //return the response with optional readonly flag
    //this exists basically for consistency and to reduce the bandwidth if not readonly which is most common
    public static class ApiOkResponse
    {
        public static object Response(object result, bool isReadOnly)
        {
            if (isReadOnly)
            {
                return new
                {
                    Data = result,
                    ReadOnly = true
                };
            }
            else
            {
                return new { Data = result };
            }

        }
    }//eoc


}//eons