Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Commit

Permalink
Feature: update raven
Browse files Browse the repository at this point in the history
  • Loading branch information
hqy2000 committed Sep 4, 2018
1 parent 577187b commit d7d91ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions web/components/Components/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
</template>

<script>
import Raven from 'raven-js'
export default {
name: 'Dashboard',
data: () => ({
Expand Down Expand Up @@ -253,12 +254,17 @@
this.avatar = "/avatar/0.png"
this.axios.get('/user/current').then((response) => {
if (response.data['code'] === 200) {
this.username = response.data['data']['username']
this.admin = response.data['data']['admin']
this.verified = response.data['data']['verified']
this.unread = response.data['data']['unread']
this.avatar = "/avatar/" + response.data['data']['id'] + ".png?" + this.reloadC
this.loggedIn = true
Raven.setUserContext({
username: this.username,
email: this.email
});
this.reloadC++
if (this.$cookie.get("drop") === "true")
this.dropEnabled = true
Expand Down
5 changes: 4 additions & 1 deletion web/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ var i18n = new VueI18n({
})

Raven
.config('https://[email protected]/282834')
.config('https://[email protected]/282834', {
ignoreErrors: ["*Request failed*"],
ignoreUrls: ["gstatic.cn", "gstatic.com"]
})
.addPlugin(RavenVue, Vue)
.install();

Expand Down

0 comments on commit d7d91ed

Please sign in to comment.