storing contact details works
This commit is contained in:
parent
00fc6bb258
commit
6b52d06b3e
10 changed files with 138 additions and 15 deletions
13
src/middlewares/attachPublicKeyMiddleware.js
Normal file
13
src/middlewares/attachPublicKeyMiddleware.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
const sessionService = require('../services/sessionService');
|
||||
|
||||
async function attachPublicKeyMiddleware(req, res, next) {
|
||||
|
||||
const publicKey = await sessionService.getPublicKeyRelatedToSession(
|
||||
req.cookies.sessionUuid
|
||||
)
|
||||
req.cookies.publicKey = publicKey;
|
||||
|
||||
next();
|
||||
}
|
||||
|
||||
module.exports = attachPublicKeyMiddleware;
|
||||
Loading…
Add table
Add a link
Reference in a new issue