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

@@ -195,8 +195,8 @@ export default {
async asyncData(data) {
const [projects, reports] = (
await Promise.all([
data.$axios.get(`moderation/projects`, data.$auth.headers),
data.$axios.get(`report`, data.$auth.headers),
data.$axios.get(`moderation/projects`, data.$defaultHeaders()),
data.$axios.get(`report`, data.$defaultHeaders()),
])
).map((it) => it.data)
@@ -253,7 +253,7 @@ export default {
: null,
status: this.currentProject.newStatus,
},
this.$auth.headers
this.$defaultHeaders()
)
this.projects.splice(
@@ -278,7 +278,7 @@ export default {
try {
await this.$axios.delete(
`report/${this.reports[index].id}`,
this.$auth.headers
this.$defaultHeaders()
)
this.reports.splice(index, 1)