use service in middleware
This commit is contained in:
parent
16cb3b7f76
commit
a242139e42
2 changed files with 13 additions and 5 deletions
11
src/services/sessionService.js
Normal file
11
src/services/sessionService.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
const Session = require('../models/Session');
|
||||
|
||||
async function createSession(sessionUuid) {
|
||||
await Session.create({
|
||||
uuid: sessionUuid,
|
||||
created_at: new Date().toISOString()
|
||||
});
|
||||
}
|
||||
|
||||
exports.createSession = createSession;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue