Ignore:
Timestamp:
01/11/21 18:58:30 (4 years ago)
Author:
Vzdra <vladko.zdravkovski@…>
Branches:
master
Children:
33d4f5d
Parents:
5f9d25a
Message:

bugfix

Location:
src/main/java/it/finki/tinki
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/it/finki/tinki/service/WorkService.java

    r5f9d25a r8f1f460  
    77import it.finki.tinki.model.dto.response.work.JobResponseDTO;
    88import it.finki.tinki.model.dto.response.work.ProjectResponseDTO;
    9 import it.finki.tinki.model.dto.response.work.WorkResponseDTO;
    109import it.finki.tinki.model.enumerator.AccountType;
    1110
  • src/main/java/it/finki/tinki/web/controller/WorkEditController.java

    r5f9d25a r8f1f460  
    4040                                                @RequestBody InternshipRegisterDTO body){
    4141
    42         if(body.getAccountId().equals(this.workService.getJobById(id).getAccount().getId())){
     42        if(body.getAccountId().equals(this.workService.getInternshipById(id).getAccount().getId())){
    4343            Internship k = this.workService.editInternship(id, body.getTitle(), body.getDescription(), body.getSalary(), body.getOpenSpots());
    4444            return new InternshipResponseDTO(k);
     
    5151                                          @RequestBody ProjectRegisterDTO body){
    5252
    53         if(body.getAccountId().equals(this.workService.getJobById(id).getAccount().getId())) {
     53        if(body.getAccountId().equals(this.workService.getProjectById(id).getAccount().getId())) {
    5454            Project k = this.workService.editProject(id, body.getTitle(), body.getDescription(), body.getSalary());
    5555            return new ProjectResponseDTO(k);
Note: See TracChangeset for help on using the changeset viewer.