Skip to content

Commit 145a44e

Browse files
committed
fix
1 parent 0b39bd1 commit 145a44e

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

server/src/router/matches.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const router = new Hono()
2828

2929
await deleteMatch(requesterId, opponentId as UserID);
3030
c.status(204);
31-
c.text("");
31+
return c.text("");
3232
},
3333
);
3434

server/src/router/picture.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ const router = new Hono()
5454

5555
return storage.getPic(hash, String(key)).then((buf) => {
5656
if (buf) {
57-
c.body(buf);
58-
} else {
59-
error("not found", 404);
57+
return c.body(buf);
6058
}
6159
});
6260
},

server/src/router/requests.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const router = new Hono()
4040

4141
await approveRequest(senderId as UserID, receiverId);
4242
c.status(201);
43-
c.json({});
43+
return c.json({});
4444
},
4545
)
4646

@@ -51,6 +51,7 @@ const router = new Hono()
5151
const opponentId = c.req.valid("param").opponentId;
5252
const requesterId = await getUserId(c);
5353
await cancelRequest(requesterId, opponentId);
54+
return c.json({});
5455
},
5556
)
5657

@@ -64,7 +65,7 @@ const router = new Hono()
6465

6566
await rejectRequest(opponentId as UserID, requesterId); //TODO 名前を良いのに変える
6667
c.status(204);
67-
c.json({});
68+
return c.json({});
6869
},
6970
);
7071

0 commit comments

Comments
 (0)