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:
Mark van Renswoude 2018-05-02 13:14:12 +02:00
parent 92ed107558
commit 2f46dbff2c
2 changed files with 2 additions and 5 deletions

View File

@ -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({

View File

@ -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(() =>