v1.0.0
This commit is contained in:
@@ -30,10 +30,6 @@ class EntrancesService {
|
||||
"house_id": Number(row.house_id),
|
||||
"entrance_number": Number(row.entrance_number),
|
||||
"title": row.title,
|
||||
"points": JSON.parse(row.points),
|
||||
"points_number": JSON.parse(row.points_number),
|
||||
"floors_quantity": row.floors_quantity,
|
||||
"apartments_quantity": row.apartments_quantity,
|
||||
"description": row.description,
|
||||
"created_at": Number(row.created_at),
|
||||
"updated_at": Number(row.updated_at),
|
||||
@@ -65,29 +61,19 @@ class EntrancesService {
|
||||
house_id,
|
||||
entrance_number,
|
||||
title,
|
||||
points,
|
||||
points_number,
|
||||
floors_quantity,
|
||||
apartments_quantity,
|
||||
description,
|
||||
created_at,
|
||||
updated_at
|
||||
created_at
|
||||
)
|
||||
VALUES
|
||||
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
(?, ?, ?, ?, ?)
|
||||
`;
|
||||
|
||||
db.run(sql, [
|
||||
house_id,
|
||||
Number(data.entrance_number),
|
||||
data.title,
|
||||
JSON.stringify(data.points),
|
||||
JSON.stringify(data.points_number),
|
||||
data.floors_quantity,
|
||||
data.apartments_quantity,
|
||||
data.description,
|
||||
Math.floor(new Date(Date.now()).getTime()),
|
||||
Math.floor(new Date(Date.now()).getTime()),
|
||||
Math.floor(new Date(Date.now()).getTime())
|
||||
], function(err) {
|
||||
if (err) {
|
||||
console.error(err.message);
|
||||
@@ -108,10 +94,6 @@ class EntrancesService {
|
||||
entrance
|
||||
SET
|
||||
title = ?,
|
||||
points = ?,
|
||||
points_number = ?,
|
||||
floors_quantity = ?,
|
||||
apartments_quantity = ?,
|
||||
description = ?,
|
||||
updated_at = ?
|
||||
WHERE
|
||||
|
||||
Reference in New Issue
Block a user