Browse Source

Fixed API link for production build

master
Shyim 6 years ago
parent
commit
18bdb8049c
  1. 3
      public/theme/src/main.js
  2. 1
      src/Controller/Events.php
  3. 2
      src/Controller/Index.php
  4. 3
      templates/index.twig

3
public/theme/src/main.js

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

1
src/Controller/Events.php

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

2
src/Controller/Index.php

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

3
templates/index.twig

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

Loading…
Cancel
Save