chore: move get-note-pipe to api utils

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-11-21 17:05:27 +01:00
parent b4ce0dc889
commit 4b3c726101
5 changed files with 8 additions and 8 deletions

View file

@ -24,9 +24,9 @@ import { HistoryEntryDto } from '../../../../history/history-entry.dto';
import { HistoryService } from '../../../../history/history.service'; import { HistoryService } from '../../../../history/history.service';
import { SessionGuard } from '../../../../identity/session.guard'; import { SessionGuard } from '../../../../identity/session.guard';
import { ConsoleLoggerService } from '../../../../logger/console-logger.service'; import { ConsoleLoggerService } from '../../../../logger/console-logger.service';
import { GetNotePipe } from '../../../../notes/get-note.pipe';
import { Note } from '../../../../notes/note.entity'; import { Note } from '../../../../notes/note.entity';
import { User } from '../../../../users/user.entity'; import { User } from '../../../../users/user.entity';
import { GetNotePipe } from '../../../utils/get-note.pipe';
import { RequestUser } from '../../../utils/request-user.decorator'; import { RequestUser } from '../../../utils/request-user.decorator';
@UseGuards(SessionGuard) @UseGuards(SessionGuard)

View file

@ -27,7 +27,6 @@ import { SessionGuard } from '../../../identity/session.guard';
import { ConsoleLoggerService } from '../../../logger/console-logger.service'; import { ConsoleLoggerService } from '../../../logger/console-logger.service';
import { MediaUploadDto } from '../../../media/media-upload.dto'; import { MediaUploadDto } from '../../../media/media-upload.dto';
import { MediaService } from '../../../media/media.service'; import { MediaService } from '../../../media/media.service';
import { GetNotePipe } from '../../../notes/get-note.pipe';
import { NoteDto } from '../../../notes/note.dto'; import { NoteDto } from '../../../notes/note.dto';
import { Note } from '../../../notes/note.entity'; import { Note } from '../../../notes/note.entity';
import { NoteMediaDeletionDto } from '../../../notes/note.media-deletion.dto'; import { NoteMediaDeletionDto } from '../../../notes/note.media-deletion.dto';
@ -38,6 +37,7 @@ import { RevisionDto } from '../../../revisions/revision.dto';
import { RevisionsService } from '../../../revisions/revisions.service'; import { RevisionsService } from '../../../revisions/revisions.service';
import { User } from '../../../users/user.entity'; import { User } from '../../../users/user.entity';
import { UsersService } from '../../../users/users.service'; import { UsersService } from '../../../users/users.service';
import { GetNotePipe } from '../../utils/get-note.pipe';
import { MarkdownBody } from '../../utils/markdownbody-decorator'; import { MarkdownBody } from '../../utils/markdownbody-decorator';
import { RequestUser } from '../../utils/request-user.decorator'; import { RequestUser } from '../../utils/request-user.decorator';

View file

@ -31,7 +31,6 @@ import { HistoryService } from '../../../history/history.service';
import { ConsoleLoggerService } from '../../../logger/console-logger.service'; import { ConsoleLoggerService } from '../../../logger/console-logger.service';
import { MediaUploadDto } from '../../../media/media-upload.dto'; import { MediaUploadDto } from '../../../media/media-upload.dto';
import { MediaService } from '../../../media/media.service'; import { MediaService } from '../../../media/media.service';
import { GetNotePipe } from '../../../notes/get-note.pipe';
import { NoteMetadataDto } from '../../../notes/note-metadata.dto'; import { NoteMetadataDto } from '../../../notes/note-metadata.dto';
import { Note } from '../../../notes/note.entity'; import { Note } from '../../../notes/note.entity';
import { NotesService } from '../../../notes/notes.service'; import { NotesService } from '../../../notes/notes.service';
@ -43,6 +42,7 @@ import {
successfullyDeletedDescription, successfullyDeletedDescription,
unauthorizedDescription, unauthorizedDescription,
} from '../../utils/descriptions'; } from '../../utils/descriptions';
import { GetNotePipe } from '../../utils/get-note.pipe';
import { RequestUser } from '../../utils/request-user.decorator'; import { RequestUser } from '../../utils/request-user.decorator';
@ApiTags('me') @ApiTags('me')

View file

@ -39,7 +39,6 @@ import { HistoryService } from '../../../history/history.service';
import { ConsoleLoggerService } from '../../../logger/console-logger.service'; import { ConsoleLoggerService } from '../../../logger/console-logger.service';
import { MediaUploadDto } from '../../../media/media-upload.dto'; import { MediaUploadDto } from '../../../media/media-upload.dto';
import { MediaService } from '../../../media/media.service'; import { MediaService } from '../../../media/media.service';
import { GetNotePipe } from '../../../notes/get-note.pipe';
import { NoteMetadataDto } from '../../../notes/note-metadata.dto'; import { NoteMetadataDto } from '../../../notes/note-metadata.dto';
import { import {
NotePermissionsDto, NotePermissionsDto,
@ -60,6 +59,7 @@ import {
unauthorizedDescription, unauthorizedDescription,
} from '../../utils/descriptions'; } from '../../utils/descriptions';
import { FullApi } from '../../utils/fullapi-decorator'; import { FullApi } from '../../utils/fullapi-decorator';
import { GetNotePipe } from '../../utils/get-note.pipe';
import { MarkdownBody } from '../../utils/markdownbody-decorator'; import { MarkdownBody } from '../../utils/markdownbody-decorator';
import { RequestUser } from '../../utils/request-user.decorator'; import { RequestUser } from '../../utils/request-user.decorator';

View file

@ -11,10 +11,10 @@ import {
PipeTransform, PipeTransform,
} from '@nestjs/common'; } from '@nestjs/common';
import { ForbiddenIdError, NotInDBError } from '../errors/errors'; import { ForbiddenIdError, NotInDBError } from '../../errors/errors';
import { ConsoleLoggerService } from '../logger/console-logger.service'; import { ConsoleLoggerService } from '../../logger/console-logger.service';
import { Note } from './note.entity'; import { Note } from '../../notes/note.entity';
import { NotesService } from './notes.service'; import { NotesService } from '../../notes/notes.service';
@Injectable() @Injectable()
export class GetNotePipe implements PipeTransform<string, Promise<Note>> { export class GetNotePipe implements PipeTransform<string, Promise<Note>> {