wip sessionService

This commit is contained in:
counterweight 2025-03-07 15:35:42 +01:00
parent 53219924ff
commit a2e44553d6
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C

View file

@ -1,7 +1,5 @@
const uuid = require('uuid'); const uuid = require('uuid');
const constants = require('../constants');
class SessionServiceProvider { class SessionServiceProvider {
constructor({ models, constants, invitesService }) { constructor({ models, constants, invitesService }) {
this.models = models; this.models = models;
@ -15,7 +13,7 @@ class SessionServiceProvider {
const expiryTimestamp = new Date(currentTimestamp.getTime()); const expiryTimestamp = new Date(currentTimestamp.getTime());
expiryTimestamp.setSeconds( expiryTimestamp.setSeconds(
expiryTimestamp.getSeconds() + expiryTimestamp.getSeconds() +
constants.DEFAULT_SESSION_DURATION_SECONDS this.constants.DEFAULT_SESSION_DURATION_SECONDS
); );
return await this.models.SessionCreated.create({ return await this.models.SessionCreated.create({