File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,6 +53,4 @@ dbAdapter.connectToDatabase();
5353
5454//start application
5555const port = process . env . PORT || 3000 ;
56- app . listen ( port , ( ) => debugStartup ( `Listening on port ${ port } ...` ) ) ;
57-
58-
56+ app . listen ( port , ( ) => debugStartup ( `Listening on port ${ port } ...` ) ) ;
Original file line number Diff line number Diff line change @@ -34,6 +34,13 @@ async function getUserByUsername(username) {
3434 return result . rows [ 0 ] ;
3535}
3636
37+ async function getUserByEmailVerificationCode ( code ) {
38+ // Abfrage ausführen
39+ const result = await client . query ( 'SELECT * FROM users WHERE email_verification_code = $1' , [ code ] )
40+ return result . rows [ 0 ] ;
41+ }
42+
43+
3744async function updateUser ( user ) {
3845 const query = `
3946 UPDATE users
@@ -115,5 +122,6 @@ module.exports = {
115122 disconnectFromDatabase,
116123 createUser,
117124 getUserByUsername,
118- updateUser
125+ updateUser,
126+ getUserByEmailVerificationCode
119127}
You can’t perform that action at this time.
0 commit comments