chore: don't spread arguments (#933)

Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: vikunja/frontend#933
Reviewed-by: konrad <k@knt.li>
Co-authored-by: dpschen <dpschen@noreply.kolaente.de>
Co-committed-by: dpschen <dpschen@noreply.kolaente.de>
This commit is contained in:
dpschen 2021-11-02 18:17:25 +00:00 committed by konrad
parent ee430b8687
commit d1ff800b41
1 changed files with 2 additions and 5 deletions

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})
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) {