File tree Expand file tree Collapse file tree 4 files changed +5
-9
lines changed
Expand file tree Collapse file tree 4 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ const env = {
1111 acquire : 30000 ,
1212 idle : 10000
1313 } ,
14- logging : process . env . REST_DB_LOGGING === true ||
15- process . env . REST_DB_LOGGING === 'true' ? console . log : false ,
14+ logging : process . env . REST_DB_LOGGING === true || process . env . REST_DB_LOGGING === 'true' ? console . log : false
1615} ;
1716
1817export default env ;
Original file line number Diff line number Diff line change 11const env = {
22 dialect : 'sqlite' ,
33 storage : './rest-storage-db.sqlite' ,
4- logging : process . env . REST_DB_LOGGING === true ||
5- process . env . REST_DB_LOGGING === 'true' ? console . log : false ,
4+ logging : process . env . REST_DB_LOGGING === true || process . env . REST_DB_LOGGING === 'true' ? console . log : false
65} ;
76
87export default env ;
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ const update = (req, res) => {
5757 }
5858
5959 Places . update ( req . body ,
60- { where : { id : id } } ) . then ( ( ) => {
60+ { where : { id } } ) . then ( ( ) => {
6161 res . status ( 200 ) . json ( { mgs : 'Updated Successfully -> Place ID = ' + id } ) ;
6262 } ) . catch ( err => {
6363 logger . error ( err ) ;
@@ -69,7 +69,7 @@ const update = (req, res) => {
6969const _delete = ( req , res ) => {
7070 const id = req . params . id ;
7171 Places . destroy ( {
72- where : { id : id }
72+ where : { id }
7373 } ) . then ( ( ) => {
7474 res . status ( 200 ) . json ( { msg : 'Deleted Successfully -> Place ID = ' + id } ) ;
7575 } ) . catch ( err => {
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ db.sequelize.sync({ force: initDb }).then(() => {
3333 { name : 'Mutterstadt' , lat : 49.433333 , lon : 8.35 }
3434 ] ) ;
3535
36- verboseLogging ( 'Created initial dataset(s)' ) ;
36+ logger . info ( 'Created initial dataset(s)' ) ;
3737 }
3838} ) ;
3939
@@ -47,8 +47,6 @@ app.get(
4747 } )
4848) ;
4949
50- const verbose = true ;
51-
5250// start server and export the instance (for unit tests mainly)
5351app . listen ( port , ( ) =>
5452 logger . info ( `REST server listening on port ${ port } !` )
You can’t perform that action at this time.
0 commit comments