mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-18 00:54:43 -04:00
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>
This commit is contained in:
parent
4426d6f51a
commit
56e2270736
4 changed files with 27 additions and 6 deletions
|
@ -6,11 +6,12 @@
|
|||
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])],
|
||||
imports: [TypeOrmModule.forFeature([Session]), LoggerModule],
|
||||
exports: [SessionService],
|
||||
providers: [SessionService],
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue