mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 13:24:24 +00:00
add linting to server folder
This commit is contained in:
3
src/server/.gitignore
vendored
Normal file
3
src/server/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# ignore node_modules folder for eslint
|
||||||
|
node_modules
|
||||||
|
webapp
|
||||||
@@ -31,7 +31,7 @@ class POSTHandler {
|
|||||||
db.writeJSONDataSimple( 'seatplan', data.location, dat ).then( resp => {
|
db.writeJSONDataSimple( 'seatplan', data.location, dat ).then( resp => {
|
||||||
db.getJSONDataSimple( 'locations', data.location ).then( dat => {
|
db.getJSONDataSimple( 'locations', data.location ).then( dat => {
|
||||||
let s = dat;
|
let s = dat;
|
||||||
s[ 'totalSeats' ] = data.data.seatInfo.count
|
s[ 'totalSeats' ] = data.data.seatInfo.count;
|
||||||
db.writeJSONDataSimple( 'locations', data.location, s ).then( () => {
|
db.writeJSONDataSimple( 'locations', data.location, s ).then( () => {
|
||||||
resolve( resp );
|
resolve( resp );
|
||||||
} );
|
} );
|
||||||
@@ -44,7 +44,7 @@ class POSTHandler {
|
|||||||
db.writeJSONDataSimple( 'seatplan', data.location, { 'draft': {}, 'save': data.data } ).then( resp => {
|
db.writeJSONDataSimple( 'seatplan', data.location, { 'draft': {}, 'save': data.data } ).then( resp => {
|
||||||
db.getJSONDataSimple( 'locations', data.location ).then( dat => {
|
db.getJSONDataSimple( 'locations', data.location ).then( dat => {
|
||||||
let s = dat;
|
let s = dat;
|
||||||
s[ 'totalSeats' ] = data.data.seatInfo.count
|
s[ 'totalSeats' ] = data.data.seatInfo.count;
|
||||||
db.writeJSONDataSimple( 'locations', data.location, s ).then( () => {
|
db.writeJSONDataSimple( 'locations', data.location, s ).then( () => {
|
||||||
resolve( resp );
|
resolve( resp );
|
||||||
} );
|
} );
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const fs = require( 'fs' );
|
|||||||
// const ph = require( './paymentHandler.js' );
|
// const ph = require( './paymentHandler.js' );
|
||||||
// const paymentHandler = new ph();
|
// const paymentHandler = new ph();
|
||||||
|
|
||||||
module.exports = ( app, settings ) => {
|
module.exports = ( app ) => {
|
||||||
app.get( '/payments/canceled', ( req, res ) => {
|
app.get( '/payments/canceled', ( req, res ) => {
|
||||||
res.sendFile( path.join( __dirname + '/../../ui/en/payments/canceled.html' ) );
|
res.sendFile( path.join( __dirname + '/../../ui/en/payments/canceled.html' ) );
|
||||||
} );
|
} );
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable no-undef */
|
||||||
const { createApp } = Vue;
|
const { createApp } = Vue;
|
||||||
|
|
||||||
createApp( {
|
createApp( {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable no-undef */
|
||||||
const { createApp } = Vue;
|
const { createApp } = Vue;
|
||||||
|
|
||||||
createApp( {
|
createApp( {
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
"vue": "^3.3.4"
|
"vue": "^3.3.4"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "test.js"
|
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
var theme = localStorage.getItem( 'theme' ) ?? '';
|
let theme = localStorage.getItem( 'theme' ) ?? '';
|
||||||
if ( window.matchMedia( '(prefers-color-scheme: dark)' ).matches || theme === '☼' ) {
|
if ( window.matchMedia( '(prefers-color-scheme: dark)' ).matches || theme === '☼' ) {
|
||||||
document.documentElement.classList.add( 'dark' );
|
document.documentElement.classList.add( 'dark' );
|
||||||
document.getElementById( 'themeSelector' ).innerHTML = '☼';
|
document.getElementById( 'themeSelector' ).innerHTML = '☼';
|
||||||
@@ -9,6 +9,7 @@ if ( window.matchMedia( '(prefers-color-scheme: dark)' ).matches || theme === '&
|
|||||||
theme = '☽';
|
theme = '☽';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
function changeTheme () {
|
function changeTheme () {
|
||||||
if ( theme === '☼' ) {
|
if ( theme === '☼' ) {
|
||||||
document.documentElement.classList.remove( 'dark' );
|
document.documentElement.classList.remove( 'dark' );
|
||||||
|
|||||||
Reference in New Issue
Block a user