Changeset 3ded84d in Git for src/main/java/com/wediscussmovies/project/web/controller/PersonsController.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/PersonsController.java
r7fafead r3ded84d 1 1 package com.wediscussmovies.project.web.controller; 2 2 3 import com.wediscussmovies.project.model. Person;3 import com.wediscussmovies.project.model.*; 4 4 import com.wediscussmovies.project.model.enumerations.PersonType; 5 5 import com.wediscussmovies.project.service.PersonService; … … 15 15 16 16 @Controller 17 @RequestMapping(".")18 17 public class PersonsController { 19 18 private final PersonService personSerivce; … … 101 100 @RequestParam String name, 102 101 @RequestParam String surname, 103 @RequestParam PersonTypetype,102 @RequestParam Character type, 104 103 @RequestParam Date date_of_birth, 105 104 @RequestParam String image_url, … … 108 107 if(personSerivce.save(person)){ 109 108 String toWhere = "actors"; 110 if(type == PersonType.D)109 //if(type == PersonType.D) 111 110 toWhere = "directors"; 112 111 return "redirect:/"+toWhere;
Note:
See TracChangeset
for help on using the changeset viewer.