Skip to content

Commit

Permalink
chore: apply review
Browse files Browse the repository at this point in the history
  • Loading branch information
Marades committed Jun 29, 2024
1 parent 8149057 commit 5b7174a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 1 addition & 5 deletions src/modules/folders/folders.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ export class FolderRepository {
private readonly folderModel: Model<Folder>,
) {}

async create(
userId: string,
name: string,
type: FolderType = FolderType.CUSTOM,
) {
async create(userId: string, name: string, type: FolderType) {
const folder = await this.folderModel.create({
userId,
name,
Expand Down
2 changes: 2 additions & 0 deletions src/modules/folders/folders.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Types } from 'mongoose';
import { FolderWithCount } from './dto/folder-with-count.dto';
import { FolderRepository } from './folders.repository';
import { PostsRepository } from '../posts/posts.repository';
import { FolderType } from '@src/infrastructure/database/types/folder-type.enum';

@Injectable()
export class FoldersService {
Expand All @@ -16,6 +17,7 @@ export class FoldersService {
const folder = await this.folderRepository.create(
userId,
createFolderDto.name,
FolderType.CUSTOM,
);

return folder;
Expand Down

0 comments on commit 5b7174a

Please sign in to comment.