use service in middleware

This commit is contained in:
counterweight 2025-02-10 01:26:25 +01:00
parent 16cb3b7f76
commit a242139e42
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
2 changed files with 13 additions and 5 deletions

View 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;