Changeset 3ded84d in Git for src/main/java/com/wediscussmovies/project/web/controller/ReplyController.java
- Timestamp:
- 01/18/22 17:18:17 (3 years ago)
- Branches:
- main
- Children:
- e0ef1b1
- Parents:
- 7fafead
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/wediscussmovies/project/web/controller/ReplyController.java
r7fafead r3ded84d 1 1 package com.wediscussmovies.project.web.controller; 2 2 3 import com.wediscussmovies.project.model. Reply;3 import com.wediscussmovies.project.model.*; 4 4 import com.wediscussmovies.project.service.ReplyService; 5 import org.springframework.stereotype.Controller; 5 6 import org.springframework.ui.Model; 6 7 import org.springframework.web.bind.annotation.GetMapping; … … 11 12 import java.util.Optional; 12 13 14 @Controller 13 15 public class ReplyController { 14 16 private final ReplyService replyService; … … 37 39 reply.setText(text); 38 40 replyService.save(reply); 39 return "redirect:/discussions/"+reply.getDiscussion ().getId();41 return "redirect:/discussions/"+reply.getDiscussionId(); 40 42 } 41 43 }
Note:
See TracChangeset
for help on using the changeset viewer.