From d1ff800b415254922f0e25d0d65bd7265b57c89c Mon Sep 17 00:00:00 2001 From: dpschen Date: Tue, 2 Nov 2021 18:17:25 +0000 Subject: [PATCH] chore: don't spread arguments (#933) Co-authored-by: Dominik Pschenitschni Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/933 Reviewed-by: konrad Co-authored-by: dpschen Co-committed-by: dpschen --- src/store/modules/auth.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/store/modules/auth.js b/src/store/modules/auth.js index 617c85e65..2a2991ec8 100644 --- a/src/store/modules/auth.js +++ b/src/store/modules/auth.js @@ -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}) 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) {