From 83830548fd9950d1066e5c0edd8f5d56ab21aa16 Mon Sep 17 00:00:00 2001
From: Alex Renoki <rennokki@gmail.com>
Date: Thu, 13 Aug 2020 15:21:55 +0300
Subject: [PATCH] Fixed the urls for the dashboard API calls

---
 resources/views/dashboard.blade.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php
index fbf90c7d91..58a64261b9 100644
--- a/resources/views/dashboard.blade.php
+++ b/resources/views/dashboard.blade.php
@@ -118,7 +118,7 @@
                     wssPort: this.port === null ? 6001 : this.port,
                     wsPath: this.app.path === null ? '' : this.app.path,
                     disableStats: true,
-                    authEndpoint: '{{ url('/auth') }}',
+                    authEndpoint: '{{ url(request()->path().'/auth') }}',
                     auth: {
                         headers: {
                             'X-CSRF-Token': "{{ csrf_token() }}",
@@ -162,7 +162,7 @@
             },
 
             loadChart() {
-                $.getJSON('{{ url('/api') }}/' + this.app.id + '/statistics', (data) => {
+                $.getJSON('{{ url(request()->path().'/api') }}/' + this.app.id + '/statistics', (data) => {
 
                     let chartData = [
                         {
@@ -246,7 +246,7 @@
             },
 
             sendEvent() {
-                $.post('{{ url('/event') }}', {
+                $.post('{{ url(request()->path().'/event') }}', {
                     _token: '{{ csrf_token() }}',
                     key: this.app.key,
                     secret: this.app.secret,