We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think this function is better as a promise.
asyncData = (context) => new Promise((resolve, reject) => { context.$axios.$get('auth/discord/redirect') .then(result => resolve(result)) .catch(reason => reject(reason)) })
Originally posted by @Soliel in https://github.com/crybapp/web/diffs
The text was updated successfully, but these errors were encountered:
asyncData functions are very large despite not doing all that much and are better expressed as a promise.
The expression as a promise leads to a much more concise syntax as shown above.
Not a very important change but it would be a nice one.
According to @JeDaYoshi there were some issues with handling it as a promise. This page may or may not shed some light on the issue: https://nuxtjs.org/guide/async-data/
This issue is to resolve the inability to use promises for async data and adopt the syntax.
Sorry, something went wrong.
No branches or pull requests
I think this function is better as a promise.
Originally posted by @Soliel in https://github.com/crybapp/web/diffs
The text was updated successfully, but these errors were encountered: