Upgrade node packages

This commit is contained in:
nemunaire 2020-04-17 17:04:11 +02:00
parent 7b9544b3db
commit 762966908c
5 changed files with 859 additions and 939 deletions

View file

@ -1,5 +1,5 @@
{ {
"name": "htdocs", "name": "HappyDNS-Frontend",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
@ -8,23 +8,27 @@
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
"axios": "^0.19.0", "axios": "^0.19.2",
"bootstrap": "^4.4.1", "bootstrap": "^4.4.1",
"bootstrap-vue": "^2.0.0-rc.28", "bootstrap-vue": "^2.11.0",
"vue": "^2.6.10", "eslint-plugin-import": "^2.20.2",
"vue-router": "^3.0.6", "eslint-plugin-node": "^11.1.0",
"vuex": "^3.1.2" "eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"vue": "^2.6.11",
"vue-router": "^3.1.6",
"vuex": "^3.1.3"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-eslint": "^4.0.0-rc.0", "@vue/cli-plugin-eslint": "^4.0.0-rc.0",
"@vue/cli-plugin-pwa": "^4.0.0-rc.0", "@vue/cli-plugin-pwa": "^4.0.0-rc.0",
"@vue/cli-plugin-router": "^4.0.0-rc.0", "@vue/cli-plugin-router": "^4.0.0-rc.0",
"@vue/cli-service": "^4.0.0-rc.0", "@vue/cli-service": "^4.0.0-rc.0",
"@vue/eslint-config-standard": "^4.0.0", "@vue/eslint-config-standard": "^5.1.2",
"babel-eslint": "^10.0.1", "babel-eslint": "^10.0.1",
"eslint": "^5.16.0", "eslint": "^6.8.0",
"eslint-plugin-vue": "^5.0.0", "eslint-plugin-vue": "^6.2.2",
"lint-staged": "^8.1.5", "lint-staged": "^10.1.4",
"vue-template-compiler": "^2.6.10" "vue-template-compiler": "^2.6.10"
}, },
"eslintConfig": { "eslintConfig": {

View file

@ -48,7 +48,7 @@ import axios from 'axios'
function updateSession (t) { function updateSession (t) {
if (sessionStorage.token !== undefined) { if (sessionStorage.token !== undefined) {
t.session = sessionStorage.token t.session = sessionStorage.token
axios.defaults.headers.common['Authorization'] = 'Bearer '.concat(sessionStorage.token) axios.defaults.headers.common.Authorization = 'Bearer '.concat(sessionStorage.token)
axios.get('/api/users/auth') axios.get('/api/users/auth')
.then( .then(
(response) => { (response) => {
@ -56,7 +56,7 @@ function updateSession (t) {
}, },
(error) => { (error) => {
t.$bvToast.toast( t.$bvToast.toast(
`Invalid session, your have been logged out: ` + error.response.data.errmsg + `. Please login again.`, { 'Invalid session, your have been logged out: ' + error.response.data.errmsg + '. Please login again.', {
title: 'Authentication timeout', title: 'Authentication timeout',
autoHideDelay: 5000, autoHideDelay: 5000,
variant: 'danger', variant: 'danger',
@ -103,8 +103,8 @@ export default {
login (email, password) { login (email, password) {
axios axios
.post('/api/users/auth', { .post('/api/users/auth', {
'email': email, email: email,
'password': password password: password
}) })
.then( .then(
(response) => { (response) => {
@ -116,7 +116,7 @@ export default {
}, },
(error) => { (error) => {
this.$bvToast.toast( this.$bvToast.toast(
`An error occurs when trying to login: ` + error.response.data.errmsg, { 'An error occurs when trying to login: ' + error.response.data.errmsg, {
title: 'Login error', title: 'Login error',
autoHideDelay: 5000, autoHideDelay: 5000,
toaster: 'b-toaster-content-right' toaster: 'b-toaster-content-right'

View file

@ -96,13 +96,13 @@ export default {
} else if (valid) { } else if (valid) {
axios axios
.post('/api/users', { .post('/api/users', {
'email': this.signupForm.email, email: this.signupForm.email,
'password': this.signupForm.password password: this.signupForm.password
}) })
.then( .then(
(response) => { (response) => {
this.$bvToast.toast( this.$bvToast.toast(
`Login now`, { 'Login now', {
title: 'Registration successfully performed!', title: 'Registration successfully performed!',
autoHideDelay: 5000, autoHideDelay: 5000,
href: 'login', href: 'login',

View file

@ -120,7 +120,7 @@ export default {
newRR (idx) { newRR (idx) {
axios axios
.post('/api/zones/' + this.$route.params.zone + '/rr', { .post('/api/zones/' + this.$route.params.zone + '/rr', {
'string': this.rrsFiltered[idx].string string: this.rrsFiltered[idx].string
}) })
.then( .then(
(response) => { (response) => {
@ -136,9 +136,11 @@ export default {
deleteRR (idx) { deleteRR (idx) {
axios axios
.delete('/api/zones/' + this.$route.params.zone + '/rr', { data: { .delete('/api/zones/' + this.$route.params.zone + '/rr', {
'string': this.rrsFiltered[idx].string data: {
} }) string: this.rrsFiltered[idx].string
}
})
.then( .then(
(response) => { (response) => {
axios axios

File diff suppressed because it is too large Load diff