質問編集履歴

3

修正

2024/03/12 13:26

投稿

miu1
miu1

スコア7

test CHANGED
File without changes
test CHANGED
@@ -51,8 +51,7 @@
51
51
 
52
52
  // render the error page
53
53
  const httpStatusCode = (err as any).status || 500;
54
- const message = httpStatusCode + " " + err.message;
54
+ res.status(httpStatusCode).json({ message: httpStatusCode + " " + err.message });
55
- res.status(httpStatusCode).json({ message: message });
56
55
  });
57
56
 
58
57
  // ポート指定

2

修正

2024/03/12 13:23

投稿

miu1
miu1

スコア7

test CHANGED
File without changes
test CHANGED
@@ -66,7 +66,7 @@
66
66
 
67
67
  ■./src/api/employeeApiController.ts
68
68
  ```TypeScript
69
- import express, { Router, Request, Response, NextFunction } from "express";
69
+ import express, { Request, Response, NextFunction } from "express";
70
70
 
71
71
  export const employeeApiController = () => {
72
72
  const router = express.Router();

1

修正

2024/03/12 13:22

投稿

miu1
miu1

スコア7

test CHANGED
File without changes
test CHANGED
@@ -15,7 +15,7 @@
15
15
  わかるかたいらっしゃればお願いします。
16
16
 
17
17
  ■./src/index.ts
18
- ```typescript
18
+ ```TypeScript
19
19
  import express, { Request, Response, NextFunction } from "express";
20
20
  import createError from "http-errors";
21
21
  import path from "path";
@@ -65,7 +65,7 @@
65
65
  ```
66
66
 
67
67
  ■./src/api/employeeApiController.ts
68
- ```typescript
68
+ ```TypeScript
69
69
  import express, { Router, Request, Response, NextFunction } from "express";
70
70
 
71
71
  export const employeeApiController = () => {