<?php

header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: *');

require '../../modelo/red_social.php';
require '../../modelo/environment.php';
$response = array();

$red_social = RedSocial::mdlGetAllRedesSociales();

if (!$red_social) {
    $response['response'] = 'error';
    $response['message'] = 'No se encontraron red_social';
    echo json_encode($response);
    return;
}

$response['response'] = 'success';
$response['data'] = $red_social;

echo json_encode($response);
