minor
This commit is contained in:
@@ -21,7 +21,6 @@
|
|||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
import { Message } from 'element-ui'
|
import { Message } from 'element-ui'
|
||||||
import get from 'lodash/get'
|
import get from 'lodash/get'
|
||||||
import linkify from 'linkifyjs'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Register',
|
name: 'Register',
|
||||||
@@ -49,9 +48,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async register () {
|
async register () {
|
||||||
try {
|
try {
|
||||||
if (!linkify.test(this.user.email, 'email')) {
|
|
||||||
throw new Error('Invalid email')
|
|
||||||
}
|
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const user = await this.$axios.$post('/user/register', this.user)
|
const user = await this.$axios.$post('/user/register', this.user)
|
||||||
// this is the first user registered
|
// this is the first user registered
|
||||||
|
|||||||
Reference in New Issue
Block a user