回答編集履歴

3

修正

2024/03/13 13:30

投稿

miu1
miu1

スコア7

test CHANGED
@@ -15,7 +15,7 @@
15
15
  async (request: Request, response: Response, next: NextFunction) => {
16
16
  try {
17
17
  response.json({ message: "done" });
18
- // 実際はserviceなどを呼ぶ、コードはイメージ
18
+ // 実際はserviceなどを呼ぶ、コードはイメージ
19
19
  // const employees = await employeeService.find();
20
20
  // response.json(employees);
21
21
  } catch (exception: any) {

2

しあ

2024/03/13 13:29

投稿

miu1
miu1

スコア7

test CHANGED
@@ -15,8 +15,9 @@
15
15
  async (request: Request, response: Response, next: NextFunction) => {
16
16
  try {
17
17
  response.json({ message: "done" });
18
- // 実際はserviceなどを呼ぶ
18
+ // 実際はserviceなどを呼ぶ、コードはイメージ
19
- // await employeeService.find();
19
+ // const employees = await employeeService.find();
20
+ // response.json(employees);
20
21
  } catch (exception: any) {
21
22
  next(exception);
22
23
  }

1

修正

2024/03/13 13:27

投稿

miu1
miu1

スコア7

test CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  ```TypeScript
6
6
  import express, { Request, Response, NextFunction } from "express";
7
+ // import { employeeService } from "employeeService";
7
8
 
8
9
  export const employeeApiController = () => {
9
10
  const router = express.Router();
@@ -14,6 +15,8 @@
14
15
  async (request: Request, response: Response, next: NextFunction) => {
15
16
  try {
16
17
  response.json({ message: "done" });
18
+ // 実際はserviceなどを呼ぶ
19
+ // await employeeService.find();
17
20
  } catch (exception: any) {
18
21
  next(exception);
19
22
  }