chore: don't spread arguments #933
|
@ -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) {
|
||||
|
|
Reference in New Issue
Block a user
Was not sure here, but seems to have been missing.
Good catch!
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.
Created a follow-up: #939