Changeset 3e59177


Ignore:
Timestamp:
03/03/23 22:21:35 (21 months ago)
Author:
SazdovaEkaterina <sazdovaekaterina@…>
Branches:
main
Children:
8f1a362
Parents:
b00d81b
Message:

session has user attribute, not employee

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Prototype Application/Paw5/src/main/java/finki/paw5/web/controllers/PostController.java

    rb00d81b r3e59177  
    4848                           HttpServletRequest request) {
    4949
    50         Employee employee = (Employee) request.getSession().getAttribute("employee");
     50        Employee employee = (Employee) request.getSession().getAttribute("user");
    5151
    5252        Pet pet = new Pet(imageUrl, AgeGroup.valueOf(ageGroup), Size.valueOf(size), breed, name, Species.valueOf(species), Gender.valueOf(gender), canBeFostered, null, employee.getShelterId());
    5353        this.petService.save(pet);
    5454
    55         Post post = new Post(LocalDate.now(), imageUrl, pet.getId() , null, employee.getId() );
     55        Post post = new Post(LocalDate.now(), imageUrl, pet.getId(), null, employee.getId());
    5656        this.postService.save(post);
    5757
Note: See TracChangeset for help on using the changeset viewer.