Skip to content

Commit

Permalink
style: Shorthand Property 적용
Browse files Browse the repository at this point in the history
프로퍼티명과 변수명이 동일한 경우 이름 생략
  • Loading branch information
kimyu0218 committed Mar 6, 2024
1 parent 78d9766 commit 2a4bc4a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
5 changes: 1 addition & 4 deletions backend/was/src/auth/service/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,7 @@ export class AuthService {
): Promise<Member | null> {
try {
return await this.membersRepository.findOne({
where: {
email: email,
providerId: providerId,
},
where: { email, providerId },
select: ['id'],
});
} catch (err: unknown) {
Expand Down
7 changes: 2 additions & 5 deletions backend/was/src/chat/chat.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export class ChatService {
): Promise<ChattingRoom> {
try {
const room: ChattingRoom | null = await manager.findOne(ChattingRoom, {
where: { id: id },
where: { id },
select: ['id', 'participant'],
});
if (!room) {
Expand All @@ -252,10 +252,7 @@ export class ChatService {
): Promise<Member> {
try {
const member: Member | null = await manager.findOne(Member, {
where: {
email: email,
providerId: providerId,
},
where: { email, providerId },
select: ['id'],
});
if (!member) {
Expand Down
7 changes: 2 additions & 5 deletions backend/was/src/tarot/tarot.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ export class TarotService {
try {
const tarotCard: TarotCard | null =
await this.tarotCardRepository.findOne({
where: {
cardNo: cardNo,
cardPack: undefined,
},
where: { cardNo, cardPack: undefined },
select: ['cardNo', 'ext', 'cardPack'],
});

Expand All @@ -53,7 +50,7 @@ export class TarotService {
try {
const tarotResult: TarotResult | null =
await this.tarotResultRepository.findOne({
where: { id: id },
where: { id },
select: ['cardUrl', 'message'],
});
if (!tarotResult) {
Expand Down

0 comments on commit 2a4bc4a

Please sign in to comment.