1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

Detect feature level on page load

This commit is contained in:
Maksym Pavlenko
2018-12-09 11:35:50 -08:00
parent 78282f61de
commit c4097bea88
2 changed files with 8 additions and 6 deletions

View File

@ -10,7 +10,6 @@
showModal: false,
feedLink: '',
// Server variables
featureLevel: 0,
userId: '',
},
@ -99,5 +98,13 @@
vm.showModal = false;
}
});
axios.get('/api/user').then(function (response) {
vm.userId = response.data.user_id;
vm.featureLevel = response.data.feature_level;
}).catch(function() {
vm.userId = ''
vm.featureLevel = 0;
})
}
});

View File

@ -163,11 +163,6 @@
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="assets/js/site.js"></script>
<script type="application/javascript">
app.featureLevel = {{.FeatureLevel}};
app.userId = {{.UserId}};
</script>
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;