From 3ce5ace16a2e334d8e9bdcff549cb6a728490987 Mon Sep 17 00:00:00 2001 From: RRRyoma <119156952+RRRyoma@users.noreply.github.com> Date: Fri, 21 Feb 2025 14:15:38 +0900 Subject: [PATCH 01/10] =?UTF-8?q?Hono=E7=A7=BB=E8=A1=8C=E5=BF=98=E3=82=8C?= =?UTF-8?q?=EF=BC=88=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=E3=83=BB=E7=B7=A8=E9=9B=86=E3=81=8C=E3=81=A7=E3=81=8D=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=83=90=E3=82=B0=EF=BC=89=E3=82=92=E8=A7=A3=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/router/users.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/router/users.ts b/server/src/router/users.ts index ece37091..1a1a6a31 100644 --- a/server/src/router/users.ts +++ b/server/src/router/users.ts @@ -107,7 +107,7 @@ const router = new Hono() // INSERT INTO "User" VALUES (body...) .post("/", async (c) => { - const partialUser = InitUserSchema.parse(c.body); + const partialUser = InitUserSchema.parse(await c.req.json()); const user = await createUser(partialUser); //ユーザー作成と同時にメモとマッチング @@ -119,7 +119,7 @@ const router = new Hono() // ユーザーの更新エンドポイント .put("/me", async (c) => { const id = await getUserId(c); - const user = UpdateUserSchema.parse(c.body); + const user = UpdateUserSchema.parse(await c.req.json()); const updated = await updateUser(id, user); c.status(200); return c.json(updated); From a47fd70136bd8a8a767937cbf0547d82a30933ca Mon Sep 17 00:00:00 2001 From: RRRyoma <119156952+RRRyoma@users.noreply.github.com> Date: Fri, 21 Feb 2025 14:22:14 +0900 Subject: [PATCH 02/10] =?UTF-8?q?Interest=E3=81=AE=E5=A4=96=E9=83=A8?= =?UTF-8?q?=E3=82=AD=E3=83=BC=E5=88=B6=E7=B4=84=E3=82=92=E8=A7=A3=E9=99=A4?= =?UTF-8?q?=EF=BC=88=E3=82=A2=E3=82=AB=E3=82=A6=E3=83=B3=E3=83=88=E5=89=8A?= =?UTF-8?q?=E9=99=A4=E3=81=8C=E5=8F=AF=E8=83=BD=E3=81=AB=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/prisma/schema.prisma | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/prisma/schema.prisma b/server/prisma/schema.prisma index b1bb051a..5b855bfc 100644 --- a/server/prisma/schema.prisma +++ b/server/prisma/schema.prisma @@ -67,7 +67,7 @@ model InterestSubject { // User->Interest->InterestSubject model Interest { userId Int - user User @relation(fields: [userId], references: [id]) + user User @relation(fields: [userId], references: [id], onDelete: Cascade ) subjectId Int subject InterestSubject @relation(fields: [subjectId], references: [id], onDelete: Cascade) From f141d7b60a49b3a36a0db8103788138808872281 Mon Sep 17 00:00:00 2001 From: RRRyoma <119156952+RRRyoma@users.noreply.github.com> Date: Fri, 21 Feb 2025 14:35:34 +0900 Subject: [PATCH 03/10] =?UTF-8?q?=E7=94=BB=E5=83=8F=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=E3=82=92=E5=BF=85=E9=A0=88=E9=A0=85=E7=9B=AE=E3=81=8B=E3=82=89?= =?UTF-8?q?=E5=A4=96=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/prisma/schema.prisma | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/prisma/schema.prisma b/server/prisma/schema.prisma index 5b855bfc..8f6bb750 100644 --- a/server/prisma/schema.prisma +++ b/server/prisma/schema.prisma @@ -35,7 +35,7 @@ model User { faculty String department String intro String - pictureUrl String + pictureUrl String @default("/avatar.svg") // bindings to other parts of this app enrollments Enrollment[] From fe89f6e9e07b48575abcbbc267989f9da5b14b9d Mon Sep 17 00:00:00 2001 From: RRRyoma <119156952+RRRyoma@users.noreply.github.com> Date: Fri, 21 Feb 2025 14:37:44 +0900 Subject: [PATCH 04/10] =?UTF-8?q?Revert=20"=E7=94=BB=E5=83=8F=E7=99=BB?= =?UTF-8?q?=E9=8C=B2=E3=82=92=E5=BF=85=E9=A0=88=E9=A0=85=E7=9B=AE=E3=81=8B?= =?UTF-8?q?=E3=82=89=E5=A4=96=E3=81=99"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit f141d7b60a49b3a36a0db8103788138808872281. --- server/prisma/schema.prisma | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/prisma/schema.prisma b/server/prisma/schema.prisma index 8f6bb750..5b855bfc 100644 --- a/server/prisma/schema.prisma +++ b/server/prisma/schema.prisma @@ -35,7 +35,7 @@ model User { faculty String department String intro String - pictureUrl String @default("/avatar.svg") + pictureUrl String // bindings to other parts of this app enrollments Enrollment[] From b6773e9783a791368e9a5c60b83f8268b244ac99 Mon Sep 17 00:00:00 2001 From: RRRyoma <119156952+RRRyoma@users.noreply.github.com> Date: Fri, 21 Feb 2025 14:39:52 +0900 Subject: [PATCH 05/10] =?UTF-8?q?=E7=94=BB=E5=83=8F=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=E3=82=92=E5=BF=85=E9=A0=88=E9=A0=85=E7=9B=AE=E3=81=8B=E3=82=89?= =?UTF-8?q?=E5=A4=96=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/prisma/schema.prisma | 2 +- web/app/signup/steps/step2_img.tsx | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/server/prisma/schema.prisma b/server/prisma/schema.prisma index 5b855bfc..8f6bb750 100644 --- a/server/prisma/schema.prisma +++ b/server/prisma/schema.prisma @@ -35,7 +35,7 @@ model User { faculty String department String intro String - pictureUrl String + pictureUrl String @default("/avatar.svg") // bindings to other parts of this app enrollments Enrollment[] diff --git a/web/app/signup/steps/step2_img.tsx b/web/app/signup/steps/step2_img.tsx index e2c3de70..de755861 100644 --- a/web/app/signup/steps/step2_img.tsx +++ b/web/app/signup/steps/step2_img.tsx @@ -23,10 +23,6 @@ export default function Step2({ }, []); async function next() { - if (!url) { - notify("画像は必須です"); - return; - } const data = { pictureUrl: url, }; From e943b1d38c228a5ea929d8e0663c30d6d0086c2d Mon Sep 17 00:00:00 2001 From: RRRyoma <119156952+RRRyoma@users.noreply.github.com> Date: Fri, 21 Feb 2025 14:40:31 +0900 Subject: [PATCH 06/10] =?UTF-8?q?=E7=94=BB=E5=83=8F=E3=82=B5=E3=82=A4?= =?UTF-8?q?=E3=82=BA=E3=81=AE=E4=B8=8A=E9=99=90=E3=82=9250MB=E3=81=AB?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/router/picture.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/router/picture.ts b/server/src/router/picture.ts index 75c6c831..1332bdd7 100644 --- a/server/src/router/picture.ts +++ b/server/src/router/picture.ts @@ -12,7 +12,7 @@ import { error } from "../lib/error"; import * as hashing from "../lib/hash"; const largeLimit = bodyLimit({ - maxSize: 50 * 1024, // 50kb + maxSize: 50 * 1024 * 1024, // 50mb onError: (c) => { return c.text("overflow :(", 413); }, From 31565906232130084c5f7a6060e774462901f11e Mon Sep 17 00:00:00 2001 From: RRRyoma <119156952+RRRyoma@users.noreply.github.com> Date: Fri, 21 Feb 2025 14:44:13 +0900 Subject: [PATCH 07/10] =?UTF-8?q?input=E3=81=AE=E3=83=95=E3=82=A9=E3=83=BC?= =?UTF-8?q?=E3=82=AB=E3=82=B9=E6=99=82=E3=81=AB=E3=82=BA=E3=83=BC=E3=83=A0?= =?UTF-8?q?=E3=81=99=E3=82=8B=E6=8C=99=E5=8B=95=E3=82=92=E8=A7=A3=E9=99=A4?= =?UTF-8?q?=EF=BC=88=E3=82=A2=E3=82=AF=E3=82=BB=E3=82=B7=E3=83=93=E3=83=AA?= =?UTF-8?q?=E3=83=86=E3=82=A3=E9=81=95=E5=8F=8D=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/app/layout.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/app/layout.tsx b/web/app/layout.tsx index b4deec2a..f6ceb29d 100644 --- a/web/app/layout.tsx +++ b/web/app/layout.tsx @@ -33,7 +33,10 @@ export default function RootLayout({ - + CourseMate From c28076835ef1e18a6d2f8b0a062aeefeb136bb30 Mon Sep 17 00:00:00 2001 From: RRRyoma <119156952+RRRyoma@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:04:10 +0900 Subject: [PATCH 08/10] =?UTF-8?q?DM=E3=81=AE=E3=83=AD=E3=83=BC=E3=83=89?= =?UTF-8?q?=E6=99=82=E3=81=AB=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=8C=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/app/chat/[id]/page.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/web/app/chat/[id]/page.tsx b/web/app/chat/[id]/page.tsx index 86858436..fe6112fb 100644 --- a/web/app/chat/[id]/page.tsx +++ b/web/app/chat/[id]/page.tsx @@ -4,23 +4,33 @@ import Link from "next/link"; import { useEffect, useState } from "react"; import * as chat from "~/api/chat/chat"; import { RoomWindow } from "~/components/chat/RoomWindow"; +import FullScreenCircularProgress from "~/components/common/FullScreenCircularProgress"; export default function Page({ params }: { params: { id: string } }) { const id = Number.parseInt(params.id); const [room, setRoom] = useState<(DMRoom & PersonalizedDMRoom) | null>(null); + const [loading, setLoading] = useState(true); + useEffect(() => { (async () => { - const room = await chat.getDM(id); - setRoom(room); + try { + const room = await chat.getDM(id); + setRoom(room); + } finally { + setLoading(false); + } })(); }, [id]); + if (loading) { + return ; + } + return ( <> {room ? ( ) : ( - // FIXME: this isn't an error when it's just loading

Sorry, an unexpected error has occurred. From bb66a159a999b096629cdec3b0c9f8574b05fe8a Mon Sep 17 00:00:00 2001 From: RRRyoma <119156952+RRRyoma@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:36:40 +0900 Subject: [PATCH 09/10] =?UTF-8?q?=E3=80=8C=E3=81=84=E3=81=84=E3=81=AD?= =?UTF-8?q?=E3=82=92=E9=80=81=E3=82=8B=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC?= =?UTF-8?q?=E3=81=8C=E3=81=84=E3=81=BE=E3=81=9B=E3=82=93=E3=80=8D=E3=81=8C?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=82=8B=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/app/home/page.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/web/app/home/page.tsx b/web/app/home/page.tsx index ba4320df..b6c0a7b1 100644 --- a/web/app/home/page.tsx +++ b/web/app/home/page.tsx @@ -28,9 +28,13 @@ export default function Home() { const [recommended, setRecommended] = useState< Queue >(() => new Queue([])); + const [loading, setLoading] = useState(true); useEffect(() => { - if (data) setRecommended(new Queue(data)); + if (data) { + setRecommended(new Queue(data)); + setLoading(false); + } }, [data]); const displayedUser = recommended.peek(0); @@ -77,13 +81,13 @@ export default function Home() { [recommended, controls, backCardControls], ); - if (data === undefined) { + if (loading) { return ; } if (currentUser == null) { return ; } - if (recommended.size() === 0) { + if (recommended.size() === 0 && loading === false) { return ; } if (error) throw error; From 1bf66eba40016bc0edb5454f6784cabfd858bf0c Mon Sep 17 00:00:00 2001 From: naka-12 <104970808+naka-12@users.noreply.github.com> Date: Thu, 6 Mar 2025 11:01:56 +0900 Subject: [PATCH 10/10] add lockfile diff --- bun.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bun.lock b/bun.lock index 2ce379b1..1a31aad0 100644 --- a/bun.lock +++ b/bun.lock @@ -429,7 +429,7 @@ "@types/body-parser": ["@types/body-parser@1.19.5", "", { "dependencies": { "@types/connect": "*", "@types/node": "*" } }, "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg=="], - "@types/bun": ["@types/bun@1.2.3", "", { "dependencies": { "bun-types": "1.2.3" } }, "sha512-054h79ipETRfjtsCW9qJK8Ipof67Pw9bodFWmkfkaUaRiIQ1dIV2VTlheshlBx3mpKr0KeK8VqnMMCtgN9rQtw=="], + "@types/bun": ["@types/bun@1.2.4", "", { "dependencies": { "bun-types": "1.2.4" } }, "sha512-QtuV5OMR8/rdKJs213iwXDpfVvnskPXY/S0ZiFbsTjQZycuqPbMW8Gf/XhLfwE5njW8sxI2WjISURXPlHypMFA=="], "@types/caseless": ["@types/caseless@0.12.5", "", {}, "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg=="], @@ -535,7 +535,7 @@ "buffer-equal-constant-time": ["buffer-equal-constant-time@1.0.1", "", {}, "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="], - "bun-types": ["bun-types@1.2.3", "", { "dependencies": { "@types/node": "*", "@types/ws": "~8.5.10" } }, "sha512-P7AeyTseLKAvgaZqQrvp3RqFM3yN9PlcLuSTe7SoJOfZkER73mLdT2vEQi8U64S1YvM/ldcNiQjn0Sn7H9lGgg=="], + "bun-types": ["bun-types@1.2.4", "", { "dependencies": { "@types/node": "*", "@types/ws": "~8.5.10" } }, "sha512-nDPymR207ZZEoWD4AavvEaa/KZe/qlrbMSchqpQwovPZCKc7pwMoENjEtHgMKaAjJhy+x6vfqSBA1QU3bJgs0Q=="], "busboy": ["busboy@1.6.0", "", { "dependencies": { "streamsearch": "^1.1.0" } }, "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA=="],