admin could add user, fix #14

This commit is contained in:
lesion
2019-06-18 14:45:04 +02:00
parent f77e6b1ed6
commit 85694906f1
9 changed files with 83 additions and 46 deletions

View File

@@ -5,7 +5,7 @@
v-icon(name='times' color='red')
h5 {{$t('common.register')}}
el-form(@submit.native.prevent='register' method='POST' action='/api/user')
el-form(@submit.native.prevent='register' method='POST' action='/api/user/register')
p(v-html="$t('register.description')")
el-input.mb-2(ref='email' v-model='user.email' type='email' required
:placeholder='$t("common.email")' autocomplete='email' name='email')
@@ -44,7 +44,7 @@ export default {
...mapActions(['login']),
async register () {
try {
const { user } = await this.$axios.$post('/user', this.user)
const { user } = await this.$axios.$post('/user/register', this.user)
Message({
message: this.$t(`register.${user.is_admin ? 'admin_' : ''}complete`),
type: 'success'