Fix random Nuxt internal server errors (#551)

* Fix random Nuxt internal server errors

* Fix ratelimit key being exposed

* Add GDPR clarification
This commit is contained in:
Geometrically
2022-06-25 16:46:10 -07:00
committed by GitHub
parent ffc8f133c9
commit 168ec9092a
19 changed files with 4426 additions and 4405 deletions

View File

@@ -17,12 +17,15 @@ export const mutations = {
}
export const actions = {
async fetchUser({ commit }, { token }) {
async fetchUser({ commit, state }, { token }) {
try {
const user = (
await this.$axios.get(`user`, {
headers: {
Authorization: token,
'x-ratelimit-key': process.server
? process.env.RATE_LIMIT_IGNORE_KEY
: '',
},
})
).data