Fixed another unconverted function call
Fixed redirect after adding a user (no need to go to the edit page afterwards like with codes)
This commit is contained in:
parent
92ed107558
commit
2f46dbff2c
@ -70,7 +70,7 @@ class CodeRepository
|
||||
{
|
||||
var codeId = generate(config.code.alphabet, config.code.length);
|
||||
|
||||
if ((await self.findCodeUserId(codeId)) !== null)
|
||||
if ((await self.getUserId(codeId)) !== null)
|
||||
throw new Error('Code ' + codeId + ' already exists');
|
||||
|
||||
self.store.insert({
|
||||
|
@ -172,10 +172,7 @@ export default {
|
||||
})
|
||||
.then((response) =>
|
||||
{
|
||||
if (self.user.id)
|
||||
this.$router.push('/admin/users');
|
||||
else
|
||||
this.$router.push('/admin/users/edit/' + response.data);
|
||||
this.$router.push('/admin/users');
|
||||
})
|
||||
.catch((error) => { shared.$emit('apiError', error, this.$router) })
|
||||
.then(() =>
|
||||
|
Loading…
Reference in New Issue
Block a user