From 276b54a4c3ba21614897026a6943a40a426dc4e9 Mon Sep 17 00:00:00 2001 From: V S Tharunika <1vstharu279@gmail.com> Date: Sun, 27 Dec 2020 19:24:51 +0530 Subject: [PATCH] after correcting all the indentation errors --- book-racker/src/components/Register.vue | 35 ++++++++----------- book-racker/src/services/Api.js | 9 +++-- .../src/services/AuthenticationService.js | 13 +++---- 3 files changed, 23 insertions(+), 34 deletions(-) diff --git a/book-racker/src/components/Register.vue b/book-racker/src/components/Register.vue index 0c8cfd02..1e9cf88a 100644 --- a/book-racker/src/components/Register.vue +++ b/book-racker/src/components/Register.vue @@ -1,3 +1,4 @@ +/* eslint-disable */ <template> <div> <h1>Register</h1> @@ -15,38 +16,30 @@ <script> import AuthentiacationService from '@/services/AuthenticationService' export default { - data () { return { - email:'', - password:'', + email: '', + password: '', error: null } }, - - methods:{ - - async register(){ - try{ - await AuthentiacationService.register({ + methods: { + async register () { + try { + await AuthentiacationService.register({ email: this.email, - password:this.password + password: this.password }) - }catch(error) { - this.error = error.response.data.error - - } - + } catch (error) { + this.error = error.response.data.error + } } } } - </script> <style scoped> - -.error{ - color:red; -} - + .error{ + color:red; + } </style> diff --git a/book-racker/src/services/Api.js b/book-racker/src/services/Api.js index 8c62998d..4719ad81 100644 --- a/book-racker/src/services/Api.js +++ b/book-racker/src/services/Api.js @@ -1,8 +1,7 @@ import axios from 'axios' -export default()=>{ - - return axios.create({ - baseURL:'http://localhost:8081/' - }) +export default() => { + return axios.create({ + baseURL: 'http://localhost:8081/' + }) } diff --git a/book-racker/src/services/AuthenticationService.js b/book-racker/src/services/AuthenticationService.js index b5aba932..a09970f6 100644 --- a/book-racker/src/services/AuthenticationService.js +++ b/book-racker/src/services/AuthenticationService.js @@ -1,10 +1,7 @@ import Api from '@/services/Api' - +/* eslint-disable no-trailing-spaces */ export default{ - - register(credentials) - { - return Api().post('register' , credentials) - } - -} \ No newline at end of file + register (credentials) { + return Api().post('register', credentials) + } +} -- GitLab