wip sessionService

This commit is contained in:
counterweight 2025-03-07 15:30:30 +01:00
parent 0f4ccf9847
commit 49c3e970cb
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C

View file

@ -27,8 +27,8 @@ class SessionServiceProvider {
});
};
async function isSessionValid(sessionUuid) {
const currentSession = await models.SessionCreated.findOne({
const isSessionValid = async (sessionUuid) => {
const currentSession = await this.models.SessionCreated.findOne({
where: {
uuid: sessionUuid,
},
@ -43,7 +43,7 @@ class SessionServiceProvider {
}
return true;
}
};
const relateSessionToPublicKey = async (sessionUuid, publicKey) => {
if (!(await isSessionValid(sessionUuid))) {