rafinhacarneiro/appgini-api

API's not returning JSON DATA, just an HTML webpage.

Opened this issue · 0 comments

table names are now found and the path is corrected in the latest fix, but the API seams broke as no data is being returned, what is being returned is the full webpage

`

<title>Base-application | </title>
<link id="browser_favicon" rel="shortcut icon" href="resources/images/appgini-icon.png">

<link rel="stylesheet" href="resources/initializr/css/bootstrap.css">
<link rel="stylesheet" href="resources/lightbox/css/lightbox.css" media="screen">
<link rel="stylesheet" href="resources/select2/select2.css" media="screen">
<link rel="stylesheet" href="resources/timepicker/bootstrap-timepicker.min.css" media="screen">
<link rel="stylesheet" href="resources/datepicker/css/datepicker.css" media="screen">
<link rel="stylesheet" href="resources/bootstrap-datetimepicker/bootstrap-datetimepicker.css" media="screen">
<link rel="stylesheet" href="dynamic.css.php">

<!--[if lt IE 9]>
		<script src="resources/initializr/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
	<![endif]-->
<script src="resources/jquery/js/jquery-1.12.4.min.js"></script>
<script>
	var $j = jQuery.noConflict();
</script>
<script src="resources/moment/moment-with-locales.min.js"></script>
<script src="resources/jquery/js/jquery.mark.min.js"></script>
<script src="resources/initializr/js/vendor/bootstrap.min.js"></script>
<script src="resources/lightbox/js/prototype.js"></script>
<script src="resources/lightbox/js/scriptaculous.js?load=effects"></script>
<script src="resources/select2/select2.min.js"></script>
<script src="resources/timepicker/bootstrap-timepicker.min.js"></script>
<script src="resources/datepicker/js/datepicker.packed.js"></script>
<script src="resources/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="common.js.php"></script>
	<nav class="navbar navbar-default navbar-fixed-top hidden-print" role="navigation">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
				<span class="sr-only">Toggle navigation</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
			<!-- application title is obtained from the name besides the yellow database icon in AppGini, use underscores for spaces -->
			<a class="navbar-brand" href="index.php"><i class="glyphicon glyphicon-home"></i> Base-Application</a>
		</div>
		<div class="collapse navbar-collapse">
			<ul class="nav navbar-nav">
			</ul>


			<ul class="nav navbar-nav navbar-right hidden-xs" style="min-width: 330px;">
				<a class="btn navbar-btn btn-default"
					href="index.php?signOut=1"><i class="glyphicon glyphicon-log-out"></i> </a>
				<p class="navbar-text">
					<strong><a href="membership_profile.php" class="navbar-link">guest</a></strong>
				</p>
			</ul>
			<ul class="nav navbar-nav visible-xs">
				<a class="btn navbar-btn btn-default btn-lg visible-xs"
					href="index.php?signOut=1"><i class="glyphicon glyphicon-log-out"></i> </a>
				<p class="navbar-text text-center">
					<strong><a href="membership_profile.php" class="navbar-link">guest</a></strong>
				</p>
			</ul>
			<script>
				/* periodically check if user is still signed in */
						setInterval(function() {
							$j.ajax({
								url: 'ajax_check_login.php',
								success: function(username) {
									if(!username.length) window.location = 'index.php?signIn=1';
								}
							});
						}, 60000);
			</script>
		</div>
	</nav>
	<div style="height: 70px;" class="hidden-print"></div>


	<div class="notifcation-placeholder" id="notifcation-placeholder-22239645"></div>
	<script>
		$j(function() {
				if(window.show_notification != undefined) return;

				window.show_notification = function(options) {
					var dismiss_class = '';
					var dismiss_icon = '';
					var cookie_name = 'hide_notification_' + options.id;
					var notif_id = 'notifcation-' + Math.ceil(Math.random() * 1000000);

					/* apply provided notficiation id if unique in page */
					if(options.id != undefined) {
						if(!$j('#' + options.id).length) notif_id = options.id;
					}

					/* notifcation should be hidden? */
					if(localStorage.getItem(cookie_name) != undefined) return;

					/* notification should be dismissable? */
					if(options.dismiss_seconds > 0 || options.dismiss_days > 0) {
						dismiss_class = ' alert-dismissible';
						dismiss_icon = '<button type="button" class="close" data-dismiss="alert">&times;</button>';
					}

					/* remove old dismissed notficiations */
					$j('.alert-dismissible.invisible').remove();

					/* append notification to notifications container */
					$j(
						'<div class="alert alert-' + options['class'] + dismiss_class + '" id="' + notif_id + '">' + 
							dismiss_icon +
							options.message + 
						'</div>'
					).appendTo('#notifcation-placeholder-22239645');

					var this_notif = $j('#' + notif_id);

					/* dismiss after x seconds if requested */
					if(options.dismiss_seconds > 0) {
						setTimeout(function() { /* */ this_notif.addClass('invisible'); }, options.dismiss_seconds * 1000);
					}

					/* dismiss for x days if requested and user dismisses it */
					if(options.dismiss_days > 0) {
						var ex_days = options.dismiss_days;
						this_notif.on('closed.bs.alert', function() {
							/* set a cookie not to show this alert for ex_days */
							localStorage.setItem(cookie_name, '1');
						});
					}
				}
			})
	</script>


	<!-- process notifications -->
	<div style="height: 60px; margin: -15px 0 -45px;">
	</div>

	<!-- Add header template below here .. -->

	<script>
		$j(function() {
				show_notification({"message":"Table 'demo.accounts' doesn't exist","class":"danger","dismiss_seconds":7200,"dismiss_days":0,"id":0});
			})
	</script>
	<!-- Add footer template above here -->
	<div class="clearfix"></div>
	<div style="height: 70px;" class="hidden-print"></div>

</div> <!-- /div class="container" -->
<div class="navbar-fixed-bottom hidden-print alert-info">
	Wed, 30 Sep 2020 09:09:08 am EDT &nbsp; &nbsp; &nbsp; &nbsp;
	v 1.1.2</div>
<script src="resources/lightbox/js/lightbox.min.js"></script>
{"report":[],"meta":{"ip":"40.138.175.74","timestamp":"2020-09-30 09:09:08"}}`