Ignore:
Timestamp:
01/18/22 17:18:17 (3 years ago)
Author:
Test <matonikolov77@…>
Branches:
main
Children:
e0ef1b1
Parents:
7fafead
Message:

Model-database resolved bugs for mapping

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/wediscussmovies/project/web/controller/ReplyController.java

    r7fafead r3ded84d  
    11package com.wediscussmovies.project.web.controller;
    22
    3 import com.wediscussmovies.project.model.Reply;
     3import com.wediscussmovies.project.model.*;
    44import com.wediscussmovies.project.service.ReplyService;
     5import org.springframework.stereotype.Controller;
    56import org.springframework.ui.Model;
    67import org.springframework.web.bind.annotation.GetMapping;
     
    1112import java.util.Optional;
    1213
     14@Controller
    1315public class ReplyController {
    1416    private final ReplyService replyService;
     
    3739        reply.setText(text);
    3840        replyService.save(reply);
    39         return "redirect:/discussions/"+reply.getDiscussion().getId();
     41        return "redirect:/discussions/"+reply.getDiscussionId();
    4042    }
    4143}
Note: See TracChangeset for help on using the changeset viewer.