Skip to content
Merged

Fix #63

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions repositorys/followRepository.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import prisma from '../config/prisma.js';
const getFollowers = async (userId, targetUserId, size, cursor, name) => {
// name이 null이면 검색 조건을 제외
const whereCondition = {
follower_id: targetUserId,
following_id: targetUserId,
...(name && {
follower: {
following: {
nickname: { contains: name, mode: 'insensitive' },
},
}),
Expand Down Expand Up @@ -78,9 +78,9 @@ const getFollowers = async (userId, targetUserId, size, cursor, name) => {

const getFollowing = async (userId, targetUserId, size, cursor, name) => {
const whereCondition = {
following_id: targetUserId,
follower_id: targetUserId,
...(name && {
following: {
follower: {
nickname: { contains: name, mode: 'insensitive' },
},
}),
Expand Down
Loading