Skip to content

Commit d562144

Browse files
committed
Apply suggestions from code review
1 parent 51abf3b commit d562144

File tree

8 files changed

+9
-13
lines changed

8 files changed

+9
-13
lines changed

.eslintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,4 +265,4 @@
265265
"never"
266266
]
267267
}
268-
}
268+
}

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ node_modules
33
*.done
44
*.pem
55
.DS_Store
6-
data/
6+
data/

.prettierrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
"options": { "parser": "json" }
88
}
99
]
10-
}
10+
}

src/common.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
declare namespace common {
22
function hash(password: string): Promise<string>;
3-
}
3+
}

src/common.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ const hash = (password) => {
1212
});
1313
};
1414

15-
module.exports = { hash };
15+
module.exports = { hash };

src/db.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ declare namespace db {
88
export function create(record: object): QueryResult;
99
export function update(id: number, record: object): QueryResult;
1010
export { deleteRecord as delete };
11-
}
11+
}

src/system/http.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,8 @@ function init(server, routes) {
1313
}
1414

1515
server.post(`/api/${iface}/${method}`, async (request) => {
16-
const response = await handler({
17-
...request.query,
18-
...request.body,
19-
headers: request.headers,
20-
});
21-
16+
const { query, body, headers } = request;
17+
const response = await handler({ ...query, ...body, headers });
2218
return response;
2319
});
2420
}

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
"skipLibCheck": true
1111
},
1212
"include": ["*", "**/*"]
13-
}
13+
}

0 commit comments

Comments
 (0)