Skip to content

Commit

Permalink
[FIX] 연구실적 수정가능하도록 변경 (#138)
Browse files Browse the repository at this point in the history
* fix(schema): achievement 등록 시 논문 제목이 길어서 등록 안되는 오류 수정

* fix(schema): achievement 관리자 수정 권한 추가

* fix: 관리자 연구실적 수정 가능하도록 변경
  • Loading branch information
hynseok authored Jul 2, 2024
1 parent d4f4d8a commit 949e010
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/achievements/achievements.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export class AchievementsService {
},
});
if (!foundUser) throw new BadRequestException("해당 논문실적은 존재하지 않습니다.");
if (foundUser.userId != user.id) throw new BadRequestException("다른 학생의 논문실적은 수정할수 없습니다.");
if (user.type === UserType.STUDENT && foundUser.userId != user.id)
throw new BadRequestException("다른 학생의 논문실적은 수정할수 없습니다.");
const { performance, paperTitle, journalName, ISSN, publicationDate, authorType, authorNumbers } =
updateAchievementDto;
try {
Expand Down

0 comments on commit 949e010

Please sign in to comment.