Move generic ApiRoutes to a whitelisted routeprovider file

This commit is contained in:
Nico Stapelbroek
2018-02-04 13:22:21 +01:00
parent c8e6a8f7c3
commit 6881859e36
5 changed files with 58 additions and 12 deletions
-3
View File
@@ -16,9 +16,6 @@ $(function () {
beforeSend: function (xhr) {
xhr.setRequestHeader('Accept', 'application/json');
// xhr.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
if (typeof window.apiKey !== 'undefined') {
xhr.setRequestHeader('X-Cachet-Token', window.apiKey);
}
},
statusCode: {
401: function () {
@@ -62,7 +62,4 @@
</body>
@yield('js')
<script src="{{ mix('dist/js/all.js') }}"></script>
<script type="text/javascript">
window.apiKey = "{{ auth()->user()->api_key }}";
</script>
</html>