1
0
mirror of https://github.com/r4sas/recastin-panel synced 2025-03-12 13:21:14 +00:00

Fixed API link for production build

This commit is contained in:
Shyim 2018-04-25 19:18:49 +02:00
parent ed14e87366
commit 18bdb8049c
4 changed files with 5 additions and 4 deletions

View File

@ -23,8 +23,7 @@ const router = new VueRouter({
});
Vue.router = router;
axios.defaults.baseURL = `http://streamer.miku/api`;
axios.defaults.baseURL = typeof appUrl === 'undefined' ? `http://streamer.miku/api` : appUrl;
Vue.use(VueAxios, axios);
Vue.use(VueNotify);

View File

@ -4,7 +4,6 @@ namespace App\Controller;
use App\Entity\Streams;
use App\Repository\StreamsRepository;
use Monolog\Logger;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

View File

@ -10,7 +10,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class Index extends Controller
{
/**
* @Route(path="/")
* @Route(path="/", name="index")
* @author Soner Sayakci <shyim@posteo.de>
*/
public function index()

View File

@ -10,6 +10,9 @@
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700,300" rel=stylesheet type=text/css>
<link href="/static/css/nucleo-icons.css" rel=stylesheet>
<link href="/static/css/app.css" rel=stylesheet>
<script>
var appUrl = '{{ absolute_url(path('index')) }}api';
</script>
</head>
<body>
<div id=app></div>