@@ -11,7 +11,7 @@ const client = new PrismaClient();
1111
1212app . get ( "/" , ( request , response ) => {
1313 const index = fs . readFileSync ( "index.html" , "utf-8" ) ;
14- const html = index . replace ( "{warning }" , "" ) ;
14+ const html = index . replace ( "{message }" , "" ) ;
1515 response . send ( html ) ;
1616} ) ;
1717
@@ -24,7 +24,7 @@ app.post("/login", async (request, response) => {
2424 } ,
2525 } ) ;
2626 if ( user === undefined ) {
27- const html = index . replace ( "{warning }" , "入力されたユーザー名は存在しません。" ) ;
27+ const html = index . replace ( "{message }" , "入力されたユーザー名は存在しません。" ) ;
2828 response . send ( html ) ;
2929 } else if ( user . password === request . body . password ) {
3030 const sessionId = await client . Session . findFirst ( {
@@ -39,7 +39,7 @@ app.post("/login", async (request, response) => {
3939 const html = login . replace ( "{username}" , prof . username ) ;
4040 response . send ( html ) ;
4141 } else {
42- const html = index . replace ( "{warning }" , "パスワードが違います。" ) ;
42+ const html = index . replace ( "{message }" , "パスワードが違います。" ) ;
4343 response . send ( html ) ;
4444 }
4545} ) ;
@@ -57,7 +57,7 @@ app.get("/profile", async (request, response) => {
5757
5858app . get ( "/register" , ( request , response ) => {
5959 const register = fs . readFileSync ( "register.html" , "utf-8" ) ;
60- const html = register . replace ( "{warning }" , "" ) ;
60+ const html = register . replace ( "{message }" , "" ) ;
6161 response . send ( html ) ;
6262} ) ;
6363
@@ -76,7 +76,7 @@ app.post("/registered", async (request, response) => {
7676 ( request . body . age === "" ) ||
7777 ( request . body . univ === "" )
7878 ) {
79- const html = register . replace ( "{warning }" , "未記入の項目があります。" ) ;
79+ const html = register . replace ( "{message }" , "未記入の項目があります。" ) ;
8080 response . send ( html ) ;
8181 } else if ( user === undefined ) {
8282 const new_user = await client . User . create ( {
@@ -99,10 +99,10 @@ app.post("/registered", async (request, response) => {
9999 univ : request . body . univ ,
100100 } ,
101101 } ) ;
102- const html = index . replace ( "{warning }" , "登録が完了しました。" ) ;
102+ const html = index . replace ( "{message }" , "登録が完了しました。" ) ;
103103 response . send ( html ) ;
104104 } else {
105- const html = register . replace ( "{warning }" , "入力されたユーザー名はすでに使用されています。別のユーザー名を入力してください。" )
105+ const html = register . replace ( "{message }" , "入力されたユーザー名はすでに使用されています。別のユーザー名を入力してください。" )
106106 response . send ( html ) ;
107107 }
108108} ) ;
0 commit comments