This commit is contained in:
Me
2023-01-17 03:04:36 +01:00
parent 68bf406834
commit 29b6042cda
6 changed files with 22 additions and 78 deletions

View File

@@ -1,9 +1,6 @@
import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { User } from 'src/users/entities/user.entity';
import { SendableUser } from 'src/users/sendableUsers';
import { Repository, Brackets } from 'typeorm';
import { CreateFriendshipDto } from './dto/create-friendship.dto';
import { Friendship, FriendshipStatus } from './entities/friendship.entity';
@@ -77,7 +74,6 @@ export class FriendshipService {
)
}),
)
// .andWhere('friendship.status != :status', {status : FriendshipStatus.BLOCKED})
.getOne()
// console.log('END Find one friend by username: ')
@@ -85,8 +81,6 @@ export class FriendshipService {
if (!friendship) {
throw new HttpException(`There is no such friendship`, HttpStatus.NOT_FOUND);
// throw new HttpException(`There is no such friendship`, HttpStatus.NO_CONTENT);
// throw new HttpException(`There is no such friendship`, 204);
}
return new SendableFriendship(friendship);
}