File tree 4 files changed +10
-14
lines changed
4 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ import dotenv from 'dotenv';
3
3
4
4
dotenv . config ( ) ;
5
5
6
- console . log ( {
7
- user : process . env . DB_USER ,
8
- password : process . env . DB_PASS ,
9
- host : process . env . DB_HOST ,
10
- port : + ( process . env . DB_PORT || 5432 ) ,
11
- database : process . env . DB_NAME ,
12
- } ) ;
6
+ // console.log({
7
+ // user: process.env.DB_USER,
8
+ // password: process.env.DB_PASS,
9
+ // host: process.env.DB_HOST,
10
+ // port: +(process.env.DB_PORT || 5432),
11
+ // database: process.env.DB_NAME,
12
+ // });
13
13
14
14
const pool = new Pool ( {
15
15
user : process . env . DB_USER ,
Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ const createOrder = async (
206
206
207
207
Назначена на:
208
208
${ serviceManPercents . rows [ 0 ] . fullName } (@${ serviceManPercents . rows [ 0 ] . tgAccount } )
209
- Дата: ${ moment ( new Date ( ) ) . format ( 'DD.MM.YYYY HH:mm:ss' ) }
209
+ Дата: ${ moment ( new Date ( ) ) . zone ( '+06:00' ) . format ( 'DD.MM.YYYY HH:mm:ss' ) }
210
210
` ,
211
211
'-1001613758269'
212
212
) ;
@@ -1331,7 +1331,7 @@ const executeAction = async (
1331
1331
1332
1332
Новый статус: "${ getStatusInfo . rows [ 0 ] . name } "
1333
1333
Комментарий: ${ comment }
1334
- Дата: ${ moment ( new Date ( ) ) . format ( 'DD.MM.YYYY HH:mm:ss' ) }
1334
+ Дата: ${ moment ( new Date ( ) ) . zone ( '+06:00' ) . format ( 'DD.MM.YYYY HH:mm:ss' ) }
1335
1335
` ,
1336
1336
'-1001613758269'
1337
1337
) ;
Original file line number Diff line number Diff line change @@ -308,8 +308,6 @@ const updateUser = async (
308
308
"tgAccount"
309
309
` ;
310
310
311
- console . log ( values . filter ( ( el ) => ! ! el ) ) ;
312
-
313
311
const insertUser = await db . query (
314
312
query ,
315
313
values . filter ( ( el ) => ! ! el )
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const getSetString = (body: any) => {
17
17
}
18
18
19
19
if ( key === 'tgAccount' && ! body [ key ] ) {
20
- return false ;
20
+ return queryArr . push ( `" ${ key } " = null` ) ;
21
21
}
22
22
23
23
if (
@@ -38,8 +38,6 @@ const getSetString = (body: any) => {
38
38
queryStr += ', "updatedDate" = NOW() ' ;
39
39
queryStr += `WHERE id = $${ ( counter += 1 ) } ` ;
40
40
41
- console . log ( queryStr ) ;
42
-
43
41
return queryStr ;
44
42
} ;
45
43
You can’t perform that action at this time.
0 commit comments