Skip to content

Commit 5f13716

Browse files
committed
fix: add +6 timezone to tg bot message
1 parent b38abcf commit 5f13716

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

backend/config/db.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import dotenv from 'dotenv';
33

44
dotenv.config();
55

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+
// });
1313

1414
const pool = new Pool({
1515
user: process.env.DB_USER,

backend/controllers/orders.controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ const createOrder = async (
206206
207207
Назначена на:
208208
${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')}
210210
`,
211211
'-1001613758269'
212212
);
@@ -1331,7 +1331,7 @@ const executeAction = async (
13311331
13321332
Новый статус: "${getStatusInfo.rows[0].name}"
13331333
Комментарий: ${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')}
13351335
`,
13361336
'-1001613758269'
13371337
);

backend/controllers/user.controller.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,6 @@ const updateUser = async (
308308
"tgAccount"
309309
`;
310310

311-
console.log(values.filter((el) => !!el));
312-
313311
const insertUser = await db.query(
314312
query,
315313
values.filter((el) => !!el)

backend/utils/queryBuilders.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const getSetString = (body: any) => {
1717
}
1818

1919
if (key === 'tgAccount' && !body[key]) {
20-
return false;
20+
return queryArr.push(`"${key}" = null`);
2121
}
2222

2323
if (
@@ -38,8 +38,6 @@ const getSetString = (body: any) => {
3838
queryStr += ', "updatedDate" = NOW() ';
3939
queryStr += `WHERE id = $${(counter += 1)}`;
4040

41-
console.log(queryStr);
42-
4341
return queryStr;
4442
};
4543

0 commit comments

Comments
 (0)