hedgedoc/backend/src/sessions/session.module.ts
David Mehren 56e2270736 fix(session-service): properly handle session store results
Previously, an undefined result in fetchUsernameForSessionId
was handled the same way as an error, rejecting the promise.

This fixes the behavior, only rejecting the promise if an error
is returned from the session store and properly returning
undefined if the session store returns that.

Signed-off-by: David Mehren <git@herrmehren.de>
2023-10-07 19:01:57 +02:00

18 lines
538 B
TypeScript

/*
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { LoggerModule } from '../logger/logger.module';
import { Session } from './session.entity';
import { SessionService } from './session.service';
@Module({
imports: [TypeOrmModule.forFeature([Session]), LoggerModule],
exports: [SessionService],
providers: [SessionService],
})
export class SessionModule {}