chore: don't spread arguments #933

Merged
konrad merged 1 commits from dpschen/frontend:feature/fix-auth-arguments into main 2021-11-02 18:17:26 +00:00

View File

@ -120,12 +120,9 @@ export default {
// Not sure if this is the right place to put the logic in, maybe a seperate js component would be better suited.
async register(ctx, credentials) {
const HTTP = HTTPFactory()
ctx.commit(LOADING, true, {root: true})
Review

Was not sure here, but seems to have been missing.

Was not sure here, but seems to have been missing.
Review

Good catch!

Good catch!
Review

Though I just noticed that's already being set in the register component (which is bad). Could you remove it there? Not nessecarily here in this PR, another one is fine.

Though I just noticed that's already being set [in the register component](https://kolaente.dev/vikunja/frontend/src/branch/main/src/views/user/Register.vue#L134) (which is bad). Could you remove it there? Not nessecarily here in this PR, another one is fine.
Review

Created a follow-up: #939

Created a follow-up: https://kolaente.dev/vikunja/frontend/pulls/939
try {
await HTTP.post('register', {
username: credentials.username,
email: credentials.email,
password: credentials.password,
})
await HTTP.post('register', credentials)
return ctx.dispatch('login', credentials)
} catch(e) {
if (e.response?.data?.message) {