mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-17 08:34:54 -04:00

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>
18 lines
538 B
TypeScript
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 {}
|