mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-17 00:24:43 -04:00
fix: code formatting
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
ae9ec95a4e
commit
4d70ccafbc
13 changed files with 51 additions and 21 deletions
|
@ -372,9 +372,9 @@ export class NotesService {
|
|||
return {
|
||||
id: note.publicId,
|
||||
aliases: await Promise.all(
|
||||
(
|
||||
await note.aliases
|
||||
).map((alias) => this.aliasService.toAliasDto(alias, note)),
|
||||
(await note.aliases).map((alias) =>
|
||||
this.aliasService.toAliasDto(alias, note),
|
||||
),
|
||||
),
|
||||
primaryAddress: (await getPrimaryAlias(note)) ?? note.publicId,
|
||||
title: latestRevision.title,
|
||||
|
|
|
@ -32,7 +32,7 @@ jest.mock(
|
|||
...jest.requireActual('@hedgedoc/commons'),
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
YDocSyncServerAdapter: jest.fn(() => Mock.of<YDocSyncServerAdapter>({})),
|
||||
} as Record<string, unknown>),
|
||||
}) as Record<string, unknown>,
|
||||
);
|
||||
|
||||
describe('websocket connection', () => {
|
||||
|
|
|
@ -143,9 +143,9 @@ export class RevisionsService {
|
|||
anonymousAuthorCount: revisionUserInfo.anonymousUserCount,
|
||||
patch: revision.patch,
|
||||
edits: await Promise.all(
|
||||
(
|
||||
await revision.edits
|
||||
).map(async (edit) => await this.editService.toEditDto(edit)),
|
||||
(await revision.edits).map(
|
||||
async (edit) => await this.editService.toEditDto(edit),
|
||||
),
|
||||
),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -61,8 +61,12 @@ export class SessionService {
|
|||
*/
|
||||
fetchUsernameForSessionId(sessionId: string): Promise<Username | undefined> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.typeormStore.get(sessionId, (error?: Error, result?: SessionState) =>
|
||||
error || !result ? reject(error) : resolve(result.username as Username),
|
||||
this.typeormStore.get(
|
||||
sessionId,
|
||||
(error?: Error, result?: SessionState) =>
|
||||
error || !result
|
||||
? reject(error)
|
||||
: resolve(result.username as Username),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue