chore: don't spread arguments (#933)
Co-authored-by: Dominik Pschenitschni <mail@celement.de> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/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:
parent
ee430b8687
commit
d1ff800b41
1 changed files with 2 additions and 5 deletions
|
@ -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.
|
// 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) {
|
async register(ctx, credentials) {
|
||||||
const HTTP = HTTPFactory()
|
const HTTP = HTTPFactory()
|
||||||
|
ctx.commit(LOADING, true, {root: true})
|
||||||
try {
|
try {
|
||||||
await HTTP.post('register', {
|
await HTTP.post('register', credentials)
|
||||||
username: credentials.username,
|
|
||||||
email: credentials.email,
|
|
||||||
password: credentials.password,
|
|
||||||
})
|
|
||||||
return ctx.dispatch('login', credentials)
|
return ctx.dispatch('login', credentials)
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
if (e.response?.data?.message) {
|
if (e.response?.data?.message) {
|
||||||
|
|
Loading…
Reference in a new issue