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/PersonsController.java

    r7fafead r3ded84d  
    11package com.wediscussmovies.project.web.controller;
    22
    3 import com.wediscussmovies.project.model.Person;
     3import com.wediscussmovies.project.model.*;
    44import com.wediscussmovies.project.model.enumerations.PersonType;
    55import com.wediscussmovies.project.service.PersonService;
     
    1515
    1616@Controller
    17 @RequestMapping(".")
    1817public class PersonsController {
    1918    private final PersonService personSerivce;
     
    101100            @RequestParam String name,
    102101            @RequestParam String surname,
    103             @RequestParam PersonType type,
     102            @RequestParam Character type,
    104103            @RequestParam Date date_of_birth,
    105104            @RequestParam String image_url,
     
    108107        if(personSerivce.save(person)){
    109108            String toWhere = "actors";
    110             if(type == PersonType.D)
     109            //if(type == PersonType.D)
    111110                toWhere = "directors";
    112111            return "redirect:/"+toWhere;
Note: See TracChangeset for help on using the changeset viewer.