mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-21 17:26:29 -05:00
Fix prettier errors
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
7960776bd1
commit
890e9c942b
4 changed files with 28 additions and 24 deletions
|
@ -17,7 +17,8 @@ import * as getRawBody from 'raw-body';
|
|||
*
|
||||
* Implementation inspired by https://stackoverflow.com/questions/52283713/how-do-i-pass-plain-text-as-my-request-body-using-nestjs
|
||||
*/
|
||||
export const MarkdownBody = createParamDecorator(async (_, context: ExecutionContext) => {
|
||||
export const MarkdownBody = createParamDecorator(
|
||||
async (_, context: ExecutionContext) => {
|
||||
// we have to check req.readable because of raw-body issue #57
|
||||
// https://github.com/stream-utils/raw-body/issues/57
|
||||
const req = context.switchToHttp().getRequest<import('express').Request>();
|
||||
|
@ -31,7 +32,9 @@ export const MarkdownBody = createParamDecorator(async (_, context: ExecutionCon
|
|||
throw new InternalServerErrorException('Failed to parse request body!');
|
||||
}
|
||||
} else {
|
||||
throw new BadRequestException('Body Content-Type has to be text/markdown!');
|
||||
throw new BadRequestException(
|
||||
'Body Content-Type has to be text/markdown!',
|
||||
);
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
);
|
||||
|
|
|
@ -25,7 +25,7 @@ async function getServerVersionFromPackageJson() {
|
|||
const packageInfo: { version: string } = JSON.parse(rawFileContent);
|
||||
const versionParts: number[] = packageInfo.version
|
||||
.split('.')
|
||||
.map((x) => parseInt(x, 10));
|
||||
.map(x => parseInt(x, 10));
|
||||
versionCache = {
|
||||
major: versionParts[0],
|
||||
minor: versionParts[1],
|
||||
|
|
|
@ -5,11 +5,13 @@
|
|||
*/
|
||||
|
||||
import {
|
||||
Column, CreateDateColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
Entity,
|
||||
ManyToMany,
|
||||
ManyToOne,
|
||||
PrimaryGeneratedColumn, UpdateDateColumn,
|
||||
PrimaryGeneratedColumn,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm/index';
|
||||
import { User } from '../users/user.entity';
|
||||
import { Revision } from './revision.entity';
|
||||
|
@ -38,14 +40,14 @@ export class Authorship {
|
|||
user: User;
|
||||
|
||||
@Column()
|
||||
startPos: number
|
||||
startPos: number;
|
||||
|
||||
@Column()
|
||||
endPos: number
|
||||
endPos: number;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt: Date
|
||||
createdAt: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updatedAt: Date
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
|
|
@ -124,7 +124,6 @@ describe('Notes', () => {
|
|||
expect(historyEntry.pinStatus).toEqual(true);
|
||||
});
|
||||
|
||||
|
||||
it.skip(`GET /me/notes/`, async () => {
|
||||
// TODO use function from HistoryService to add an History Entry
|
||||
await notesService.createNote('This is a test note.', 'test7');
|
||||
|
|
Loading…
Reference in a new issue