Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
msdio committed Dec 20, 2022
2 parents 99b0f4b + e51eab3 commit 5995443
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ export class BathroomDetailComponent implements OnInit {
}

onRatingChange(inputRate: number) {
if (this.editedRate > 0) {
this.showRatingEditConfirmAlert();
} else {
this.editRating(inputRate);
}
this.showRatingEditConfirmAlert(inputRate);
}

extendDetail() {
Expand Down Expand Up @@ -115,14 +111,14 @@ export class BathroomDetailComponent implements OnInit {
}
}

async showRatingEditConfirmAlert() {
async showRatingEditConfirmAlert(inputRate: number) {
const alert = await this.alertController.create({
message: '별점을 수정하시겠어요?',
buttons: [
{
text: '수정하기',
handler: () => {
console.log('수정 요청');
this.editRating(inputRate);
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export class BathroomService {
try {
const response = await axios({
method: 'post',
withCredentials: true,
url: `${environment.apiUrl}/api/rating`,
data: {
bathroomId,
Expand Down

0 comments on commit 5995443

Please sign in to comment.