Skip to content

Commit

Permalink
[nodejs] Follow #722
Browse files Browse the repository at this point in the history
  • Loading branch information
sugyan committed Sep 15, 2021
1 parent 22813b8 commit 2c5ce74
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions webapp/nodejs/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,6 @@ usersApi.get("/me/grades", async (req, res) => {

const db = await pool.getConnection();
try {
await db.beginTransaction();

// 履修している科目一覧取得
const [registeredCourses] = await db.query<Course[]>(
"SELECT `courses`.*" +
Expand Down Expand Up @@ -687,8 +685,6 @@ usersApi.get("/me/grades", async (req, res) => {
);
const gpas = rows.map((row) => row.gpa);

await db.commit();

const response: GetGradeResponse = {
summary: {
credits: myCredits,
Expand All @@ -703,7 +699,6 @@ usersApi.get("/me/grades", async (req, res) => {
return res.status(200).json(response);
} catch (err) {
console.error(err);
await db.rollback();
return res.status(500).send();
} finally {
db.release();
Expand Down

0 comments on commit 2c5ce74

Please sign in to comment.