@@ -11,7 +11,7 @@ const client = new PrismaClient();
1111
1212app . get ( "/" , ( request , response ) => {
1313 const index = readFileSync ( "index.html" , "utf-8" ) ;
14- const html = index . replace ( "{warning }" , "" ) ;
14+ const html = index . replace ( "{message }" , "" ) ;
1515 response . send ( html ) ;
1616} ) ;
1717
@@ -25,7 +25,7 @@ app.post("/login", async (request, response) => {
2525 } ) ;
2626 if ( user === undefined ) {
2727 const html = index . replace (
28- "{warning }" ,
28+ "{message }" ,
2929 "入力されたユーザー名は存在しません。" ,
3030 ) ;
3131 response . send ( html ) ;
@@ -42,7 +42,7 @@ app.post("/login", async (request, response) => {
4242 const html = login . replace ( "{username}" , prof . username ) ;
4343 response . send ( html ) ;
4444 } else {
45- const html = index . replace ( "{warning }" , "パスワードが違います。" ) ;
45+ const html = index . replace ( "{message }" , "パスワードが違います。" ) ;
4646 response . send ( html ) ;
4747 }
4848} ) ;
@@ -61,7 +61,7 @@ app.get("/profile", async (request, response) => {
6161
6262app . get ( "/register" , ( request , response ) => {
6363 const register = readFileSync ( "register.html" , "utf-8" ) ;
64- const html = register . replace ( "{warning }" , "" ) ;
64+ const html = register . replace ( "{message }" , "" ) ;
6565 response . send ( html ) ;
6666} ) ;
6767
@@ -80,7 +80,7 @@ app.post("/registered", async (request, response) => {
8080 request . body . age === "" ||
8181 request . body . univ === ""
8282 ) {
83- const html = register . replace ( "{warning }" , "未記入の項目があります。" ) ;
83+ const html = register . replace ( "{message }" , "未記入の項目があります。" ) ;
8484 response . send ( html ) ;
8585 } else if ( user === undefined ) {
8686 const new_user = await client . User . create ( {
@@ -103,11 +103,11 @@ app.post("/registered", async (request, response) => {
103103 univ : request . body . univ ,
104104 } ,
105105 } ) ;
106- const html = index . replace ( "{warning }" , "登録が完了しました。" ) ;
106+ const html = index . replace ( "{message }" , "登録が完了しました。" ) ;
107107 response . send ( html ) ;
108108 } else {
109109 const html = register . replace (
110- "{warning }" ,
110+ "{message }" ,
111111 "入力されたユーザー名はすでに使用されています。別のユーザー名を入力してください。" ,
112112 ) ;
113113 response . send ( html ) ;
0 commit comments