Index: src/main/java/it/finki/tinki/bootstrap/DataHolder.java
===================================================================
--- src/main/java/it/finki/tinki/bootstrap/DataHolder.java	(revision 8f1f460ab25fea06236bc61f6c6c2a7a15da2f73)
+++ src/main/java/it/finki/tinki/bootstrap/DataHolder.java	(revision 33d4f5d27eea7d3c1f8b9f0284427ed4c8376860)
@@ -11,5 +11,7 @@
 
 import javax.annotation.PostConstruct;
+import java.text.DateFormat;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
@@ -61,45 +63,50 @@
         lista = this.skillRepository.findAll();
 
-        List<Skill> l2 = new ArrayList<>();
-        l2.add(this.skillRepository.findById(3L).get());
-        l2.add(this.skillRepository.findById(2L).get());
-        l2.add(this.skillRepository.findById(4L).get());
-        l2.add(this.skillRepository.findById(7L).get());
-        l2.add(this.skillRepository.findById(1L).get());
-        l2.add(this.skillRepository.findById(5L).get());
-        l2.add(this.skillRepository.findById(9L).get());
-        l2.add(this.skillRepository.findById(6L).get());
+        List<Skill> lista2 = new ArrayList<>();
+        lista2.add(this.skillRepository.findById(3L).get());
+        lista2.add(this.skillRepository.findById(2L).get());
+        lista2.add(this.skillRepository.findById(4L).get());
+        lista2.add(this.skillRepository.findById(7L).get());
+        lista2.add(this.skillRepository.findById(1L).get());
+        lista2.add(this.skillRepository.findById(5L).get());
+        lista2.add(this.skillRepository.findById(9L).get());
+        lista2.add(this.skillRepository.findById(6L).get());
 
 
-        List<Skill> l3 = new ArrayList<>();
-        l3.add(this.skillRepository.findById(3L).get());
-        l3.add(this.skillRepository.findById(2L).get());
-        l3.add(this.skillRepository.findById(4L).get());
-        l3.add(this.skillRepository.findById(7L).get());
+        List<Skill> lista3 = new ArrayList<>();
+        lista3.add(this.skillRepository.findById(3L).get());
+        lista3.add(this.skillRepository.findById(2L).get());
+        lista3.add(this.skillRepository.findById(4L).get());
+        lista3.add(this.skillRepository.findById(7L).get());
 
-        List<Long> ids = new ArrayList<>();
+        List<Long> allSkills = new ArrayList<>();
         lista.forEach(item -> {
-            ids.add(item.getId());
+            allSkills.add(item.getId());
         });
 
-        List<Long> smalls = new ArrayList<>();
-        l2.forEach(item -> {
-            smalls.add(item.getId());
+        List<Long> skills8 = new ArrayList<>();
+        lista2.forEach(item -> {
+            skills8.add(item.getId());
         });
 
-        List<Long> sm2 = new ArrayList<>();
-        l3.forEach(item -> {
-            sm2.add(item.getId());
+        List<Long> skills4 = new ArrayList<>();
+        lista3.forEach(item -> {
+            skills4.add(item.getId());
         });
 
-        Account c = this.accountService.registerCompany("company@company", "company", "Co.co", "Macedonia", "Skopje", "Pero Nakov");
+        Account c = this.accountService.registerCompany("company@company", "company", "Co.Co", "Macedonia", "Skopje", "Pero Nakov");
+        Account ct = this.accountService.registerCompany("company@co", "company", "Co.Co", "Macedonia", "Skopje", "Pero Nakov");
         Account m = this.accountService.registerTeam("team@team", "team", "TeamRocket", 3);
 
-        this.workService.insertJob("asdfq", "asdfqw", m.getId() ,5000, smalls, AccountType.TEAM);
-        this.workService.insertJob("asdfq", "asdfqw", c.getId() ,5000, sm2, AccountType.COMPANY);
-        this.workService.insertJob("Asdf", "Asdfa", c.getId() ,5000, ids, AccountType.COMPANY);
-        this.workService.insertJob("Asdf", "Asdfa", m.getId() ,5000, ids, AccountType.TEAM);
+        this.workService.insertJob("Team Job 1", "Team job 1 requires 3 members!", m.getId() ,1515, allSkills, AccountType.TEAM);
+        this.workService.insertJob("Team Job 2", "Team job 2 requires 2 members!", m.getId() ,5511, skills4, AccountType.TEAM);
+        this.workService.insertJob("Company Job 1", "Company job 1 requires 3 members!", c.getId() ,12345, allSkills, AccountType.COMPANY);
+        this.workService.insertJob("Company Job 2", "Company job 2 requires 3 members!", ct.getId() ,8901, skills8, AccountType.COMPANY);
+        this.workService.insertInternship("Internship 1", "Opportunity to learn new things!", c.getId() ,5000, skills4, 6, AccountType.COMPANY);
+        this.workService.insertInternship("Internship 2", "Opportunity to learn new things!", c.getId() ,5000, allSkills, 3, AccountType.COMPANY);
+        this.workService.insertProject("Project 1", "Project that lasts few days!", m.getId() ,5000, skills8, new Date(), AccountType.TEAM);
+        this.workService.insertProject("Project 2", "Project that ends soon!", m.getId() ,5000, skills4, new Date(), AccountType.TEAM);
 
-        this.accountService.registerUser("user@user", "user", "Zoki", "Poki", l3, lista);
+        this.accountService.registerUser("user@user", "user", "Zoki", "Poki", lista3, lista);
 
     }
Index: src/main/java/it/finki/tinki/model/dto/response/work/InternshipResponseDTO.java
===================================================================
--- src/main/java/it/finki/tinki/model/dto/response/work/InternshipResponseDTO.java	(revision 8f1f460ab25fea06236bc61f6c6c2a7a15da2f73)
+++ src/main/java/it/finki/tinki/model/dto/response/work/InternshipResponseDTO.java	(revision 33d4f5d27eea7d3c1f8b9f0284427ed4c8376860)
@@ -2,7 +2,10 @@
 
 import it.finki.tinki.model.Address;
+import it.finki.tinki.model.Skill;
 import it.finki.tinki.model.Work.Internship;
 import it.finki.tinki.model.Users.Company;
 import lombok.Data;
+
+import java.util.List;
 
 @Data
@@ -11,4 +14,9 @@
     int openSpots;
     Address accountAddress;
+    List<Skill> skillsTrained;
+
+    public InternshipResponseDTO(){
+        super();
+    }
 
     public InternshipResponseDTO(Internship internship){
@@ -17,4 +25,5 @@
         this.openSpots = internship.getOpenSpots();
         this.accountAddress = ((Company) internship.getAccount()).getAddress();
+        this.skillsTrained = internship.getSkillsTrained();
     }
 }
Index: src/main/java/it/finki/tinki/model/dto/response/work/JobResponseDTO.java
===================================================================
--- src/main/java/it/finki/tinki/model/dto/response/work/JobResponseDTO.java	(revision 8f1f460ab25fea06236bc61f6c6c2a7a15da2f73)
+++ src/main/java/it/finki/tinki/model/dto/response/work/JobResponseDTO.java	(revision 33d4f5d27eea7d3c1f8b9f0284427ed4c8376860)
@@ -2,4 +2,5 @@
 
 import it.finki.tinki.model.Address;
+import it.finki.tinki.model.Skill;
 import it.finki.tinki.model.Work.Job;
 import it.finki.tinki.model.Users.Company;
@@ -8,11 +9,19 @@
 import lombok.Data;
 
+import java.util.List;
+
 @Data
 public class JobResponseDTO extends WorkResponseDTO {
     Address accountAddress;
     int members;
+    List<Skill> skillsRequired;
+
+    public JobResponseDTO(){
+        super();
+    }
 
     public JobResponseDTO(Job job){
         super(job.getId(), job.getTitle(), job.getDescription(), job.getSalary(), job.getAccount());
+        this.skillsRequired = job.getSkillsRequired();
         if(job.getAccount().getAccountType()==AccountType.COMPANY){
             this.accountAddress = ((Company) job.getAccount()).getAddress();
Index: src/main/java/it/finki/tinki/model/dto/response/work/ProjectResponseDTO.java
===================================================================
--- src/main/java/it/finki/tinki/model/dto/response/work/ProjectResponseDTO.java	(revision 8f1f460ab25fea06236bc61f6c6c2a7a15da2f73)
+++ src/main/java/it/finki/tinki/model/dto/response/work/ProjectResponseDTO.java	(revision 33d4f5d27eea7d3c1f8b9f0284427ed4c8376860)
@@ -1,15 +1,27 @@
 package it.finki.tinki.model.dto.response.work;
 
+import it.finki.tinki.model.Skill;
 import it.finki.tinki.model.Work.Project;
 import it.finki.tinki.model.Users.Team;
 import lombok.Data;
 
+import java.util.Date;
+import java.util.List;
+
 @Data
 public class ProjectResponseDTO extends WorkResponseDTO {
     int members;
+    Date validUntil;
+    List<Skill> skillsRequired;
+
+    public ProjectResponseDTO(){
+        super();
+    }
 
     public ProjectResponseDTO(Project project){
         super(project.getId(), project.getTitle(), project.getDescription(), project.getSalary(), project.getAccount());
         this.members = ((Team) project.getAccount()).getMembers();
+        this.validUntil = project.getValidUntil();
+        this.skillsRequired = project.getSkillsRequired();
     }
 }
Index: src/main/java/it/finki/tinki/model/dto/response/work/WorkResponseDTO.java
===================================================================
--- src/main/java/it/finki/tinki/model/dto/response/work/WorkResponseDTO.java	(revision 8f1f460ab25fea06236bc61f6c6c2a7a15da2f73)
+++ src/main/java/it/finki/tinki/model/dto/response/work/WorkResponseDTO.java	(revision 33d4f5d27eea7d3c1f8b9f0284427ed4c8376860)
@@ -14,8 +14,12 @@
     String accountName;
     AccountType accountType;
+    String error;
 
-    WorkResponseDTO(){}
+    WorkResponseDTO(){
+        this.error = "Error registering job!";
+    }
 
     WorkResponseDTO(Long id, String title, String description, int salary, Account account){
+        this.error = null;
         this.id = id;
         this.title = title;
Index: src/main/java/it/finki/tinki/repository/MatchRepository.java
===================================================================
--- src/main/java/it/finki/tinki/repository/MatchRepository.java	(revision 8f1f460ab25fea06236bc61f6c6c2a7a15da2f73)
+++ src/main/java/it/finki/tinki/repository/MatchRepository.java	(revision 33d4f5d27eea7d3c1f8b9f0284427ed4c8376860)
@@ -13,3 +13,4 @@
 public interface MatchRepository extends JpaRepository<Match, EmbeddedMatchId> {
     List<Match> findAllByEmbeddedMatchIdUserAndTypeOrderByCoefficientDesc(User user, WorkType type);
+    List<Match> deleteAllByEmbeddedMatchId_User_Id(Long userId);
 }
Index: src/main/java/it/finki/tinki/service/MatchmakerService.java
===================================================================
--- src/main/java/it/finki/tinki/service/MatchmakerService.java	(revision 8f1f460ab25fea06236bc61f6c6c2a7a15da2f73)
+++ src/main/java/it/finki/tinki/service/MatchmakerService.java	(revision 33d4f5d27eea7d3c1f8b9f0284427ed4c8376860)
@@ -1,4 +1,5 @@
 package it.finki.tinki.service;
 
+import it.finki.tinki.model.Match;
 import it.finki.tinki.model.Work.Internship;
 import it.finki.tinki.model.Work.Job;
@@ -15,3 +16,4 @@
     void setUpUserProjectMatches(Project project, User user);
     void setUpUserInternshipMatches(Internship internship, User user);
+    List<Match> removeByUserId(Long userId);
 }
Index: src/main/java/it/finki/tinki/service/impl/AccountServiceImpl.java
===================================================================
--- src/main/java/it/finki/tinki/service/impl/AccountServiceImpl.java	(revision 8f1f460ab25fea06236bc61f6c6c2a7a15da2f73)
+++ src/main/java/it/finki/tinki/service/impl/AccountServiceImpl.java	(revision 33d4f5d27eea7d3c1f8b9f0284427ed4c8376860)
@@ -214,4 +214,7 @@
 
     private void setUpUser(User u){
+
+        this.matchmakerService.removeByUserId(u.getId());
+
         List<Job> jobs = this.jobRepository.findAll();
         List<Project> projects = this.projectRepository.findAll();
Index: src/main/java/it/finki/tinki/service/impl/MatchmakerServiceImpl.java
===================================================================
--- src/main/java/it/finki/tinki/service/impl/MatchmakerServiceImpl.java	(revision 8f1f460ab25fea06236bc61f6c6c2a7a15da2f73)
+++ src/main/java/it/finki/tinki/service/impl/MatchmakerServiceImpl.java	(revision 33d4f5d27eea7d3c1f8b9f0284427ed4c8376860)
@@ -17,4 +17,5 @@
 import org.springframework.stereotype.Service;
 
+import javax.transaction.Transactional;
 import java.util.ArrayList;
 import java.util.List;
@@ -118,9 +119,14 @@
         if(coef!=0){
             EmbeddedMatchId embeddedMatchId = new EmbeddedMatchId(internship, user);
-            Match m = new Match(embeddedMatchId, coef, WorkType.PROJECT);
+            Match m = new Match(embeddedMatchId, coef, WorkType.INTERNSHIP);
             this.matchRepository.save(m);
         }
     }
 
+    @Transactional
+    @Override
+    public List<Match> removeByUserId(Long userId) {
+        return this.matchRepository.deleteAllByEmbeddedMatchId_User_Id(userId);
+    }
 
 }
Index: src/main/java/it/finki/tinki/web/controller/AccountEditController.java
===================================================================
--- src/main/java/it/finki/tinki/web/controller/AccountEditController.java	(revision 8f1f460ab25fea06236bc61f6c6c2a7a15da2f73)
+++ src/main/java/it/finki/tinki/web/controller/AccountEditController.java	(revision 33d4f5d27eea7d3c1f8b9f0284427ed4c8376860)
@@ -35,9 +35,10 @@
     }
 
-    @PostMapping(path = "/user/{id}")
+    @PostMapping(path = "/user/{id}/{email}")
     public UserResponseDTO editUser(@PathVariable(name = "id") Long id,
+                                    @PathVariable(name = "email") String email,
                                     @RequestBody UserRegisterDTO body){
 
-        Optional<?> a = this.accountService.findByIdAndEmail(id, body.getEmail(), AccountType.USER);
+        Optional<?> a = this.accountService.findByIdAndEmail(id, email, AccountType.USER);
 
         if(a.isPresent()){
@@ -51,9 +52,10 @@
     }
 
-    @PostMapping(path = "/company/{id}")
+    @PostMapping(path = "/company/{id}/{email}")
     public CompanyResponseDTO editCompany(@PathVariable(name = "id") Long id,
+                                          @PathVariable(name = "email") String email,
                                           @RequestBody CompanyRegisterDTO body){
 
-        Optional<?> a = this.accountService.findByIdAndEmail(id, body.getEmail(), AccountType.COMPANY);
+        Optional<?> a = this.accountService.findByIdAndEmail(id, email, AccountType.COMPANY);
 
         if(a.isPresent()){
@@ -65,9 +67,10 @@
     }
 
-    @PostMapping(path = "/team/{id}")
+    @PostMapping(path = "/team/{id}/{email}")
     public TeamResponseDTO editTeam(@PathVariable(name = "id") Long id,
+                                    @PathVariable(name = "email") String email,
                                     @RequestBody TeamRegisterDTO body){
 
-        Optional<?> a = this.accountService.findByIdAndEmail(id, body.getEmail(), AccountType.TEAM);
+        Optional<?> a = this.accountService.findByIdAndEmail(id, email, AccountType.TEAM);
 
         if(a.isPresent()){
Index: src/main/java/it/finki/tinki/web/controller/AccountRegisterController.java
===================================================================
--- src/main/java/it/finki/tinki/web/controller/AccountRegisterController.java	(revision 8f1f460ab25fea06236bc61f6c6c2a7a15da2f73)
+++ src/main/java/it/finki/tinki/web/controller/AccountRegisterController.java	(revision 33d4f5d27eea7d3c1f8b9f0284427ed4c8376860)
@@ -7,7 +7,5 @@
 import it.finki.tinki.model.dto.register.account.UserRegisterDTO;
 import it.finki.tinki.service.AccountService;
-import it.finki.tinki.service.MatchmakerService;
 import it.finki.tinki.service.SkillService;
-import it.finki.tinki.service.WorkService;
 import org.springframework.web.bind.annotation.*;
 
@@ -23,12 +21,8 @@
     AccountService accountService;
     SkillService skillService;
-    WorkService workService;
-    MatchmakerService matchmakerService;
 
-    public AccountRegisterController(AccountService accountService, SkillService skillService, WorkService workService, MatchmakerService matchmakerService) {
+    public AccountRegisterController(AccountService accountService, SkillService skillService) {
         this.accountService = accountService;
         this.skillService = skillService;
-        this.workService = workService;
-        this.matchmakerService = matchmakerService;
     }
 
Index: src/main/java/it/finki/tinki/web/controller/LoginController.java
===================================================================
--- src/main/java/it/finki/tinki/web/controller/LoginController.java	(revision 8f1f460ab25fea06236bc61f6c6c2a7a15da2f73)
+++ src/main/java/it/finki/tinki/web/controller/LoginController.java	(revision 33d4f5d27eea7d3c1f8b9f0284427ed4c8376860)
@@ -1,23 +1,11 @@
 package it.finki.tinki.web.controller;
 
-import it.finki.tinki.model.Work.Internship;
-import it.finki.tinki.model.Work.Job;
-import it.finki.tinki.model.Work.Project;
 import it.finki.tinki.model.Users.Account;
-import it.finki.tinki.model.Users.Company;
 import it.finki.tinki.model.Users.Team;
 import it.finki.tinki.model.Users.User;
 import it.finki.tinki.model.dto.*;
 import it.finki.tinki.model.dto.response.account.LoginResponseDTO;
-import it.finki.tinki.model.dto.response.account.CompanyResponseDTO;
-import it.finki.tinki.model.dto.response.account.TeamResponseDTO;
-import it.finki.tinki.model.dto.response.account.UserResponseDTO;
-import it.finki.tinki.model.dto.response.work.InternshipResponseDTO;
-import it.finki.tinki.model.dto.response.work.JobResponseDTO;
-import it.finki.tinki.model.dto.response.work.ProjectResponseDTO;
-import it.finki.tinki.model.enumerator.AccountType;
 import it.finki.tinki.service.AccountService;
 import it.finki.tinki.service.BuilderService;
-import it.finki.tinki.service.MatchmakerService;
 import it.finki.tinki.service.WorkService;
 import org.springframework.web.bind.annotation.*;
@@ -32,10 +20,8 @@
 
     AccountService accountService;
-    WorkService workService;
     BuilderService builderService;
 
-    public LoginController(AccountService accountService, WorkService workService, BuilderService builderService) {
+    public LoginController(AccountService accountService, BuilderService builderService) {
         this.accountService = accountService;
-        this.workService = workService;
         this.builderService = builderService;
     }
@@ -58,18 +44,3 @@
         return new LoginResponseDTO();
     }
-
-    @GetMapping(path = "/job/search")
-    public List<JobResponseDTO> jobRes(@RequestParam(name = "text") String text){
-        return this.workService.fullTextJobSearch(text);
-    }
-
-    @GetMapping(path = "/internship/search")
-    public List<InternshipResponseDTO> internshipRes(@RequestParam(name = "text") String text){
-        return this.workService.fullTextInternshipSearch(text);
-    }
-
-    @GetMapping(path = "/project/search")
-    public List<ProjectResponseDTO> projectRes(@RequestParam(name = "text") String text){
-        return this.workService.fullTextProjectSearch(text);
-    }
 }
Index: src/main/java/it/finki/tinki/web/controller/SearchController.java
===================================================================
--- src/main/java/it/finki/tinki/web/controller/SearchController.java	(revision 33d4f5d27eea7d3c1f8b9f0284427ed4c8376860)
+++ src/main/java/it/finki/tinki/web/controller/SearchController.java	(revision 33d4f5d27eea7d3c1f8b9f0284427ed4c8376860)
@@ -0,0 +1,36 @@
+package it.finki.tinki.web.controller;
+
+import it.finki.tinki.model.dto.response.work.InternshipResponseDTO;
+import it.finki.tinki.model.dto.response.work.JobResponseDTO;
+import it.finki.tinki.model.dto.response.work.ProjectResponseDTO;
+import it.finki.tinki.service.WorkService;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@CrossOrigin("http://localhost:3000")
+@RequestMapping("/api/search")
+public class SearchController {
+
+    WorkService workService;
+
+    public SearchController(WorkService workService) {
+        this.workService = workService;
+    }
+
+    @GetMapping(path = "/job")
+    public List<JobResponseDTO> jobRes(@RequestParam(name = "text") String text){
+        return this.workService.fullTextJobSearch(text);
+    }
+
+    @GetMapping(path = "/internship")
+    public List<InternshipResponseDTO> internshipRes(@RequestParam(name = "text") String text){
+        return this.workService.fullTextInternshipSearch(text);
+    }
+
+    @GetMapping(path = "/project")
+    public List<ProjectResponseDTO> projectRes(@RequestParam(name = "text") String text){
+        return this.workService.fullTextProjectSearch(text);
+    }
+}
Index: src/main/java/it/finki/tinki/web/controller/WorkEditController.java
===================================================================
--- src/main/java/it/finki/tinki/web/controller/WorkEditController.java	(revision 8f1f460ab25fea06236bc61f6c6c2a7a15da2f73)
+++ src/main/java/it/finki/tinki/web/controller/WorkEditController.java	(revision 33d4f5d27eea7d3c1f8b9f0284427ed4c8376860)
@@ -14,4 +14,7 @@
 import org.springframework.web.bind.annotation.*;
 
+import java.util.HashMap;
+import java.util.Map;
+
 @RestController
 @CrossOrigin(origins = "http://localhost:3000")
@@ -26,34 +29,55 @@
 
     @PostMapping("/job/{id}")
-    public JobResponseDTO editJob(@PathVariable Long id,
-                                  @RequestBody JobRegisterDTO body){
+    public Map<String, String> editJob(@PathVariable Long id,
+                                       @RequestBody JobRegisterDTO body){
+
+        Map<String, String> response = new HashMap<>();
 
         if(body.getAccountId().equals(this.workService.getJobById(id).getAccount().getId())) {
             Job k = this.workService.editJob(id, body.getTitle(), body.getDescription(), body.getSalary());
-            return new JobResponseDTO(k);
+            if(k!=null){
+                response.put("success", "Job edited successfully!");
+                return response;
+            }
         }
-        return null;
+
+        response.put("error", "Internship edit failed!");
+        return response;
     }
 
     @PostMapping("/internship/{id}")
-    public InternshipResponseDTO editInternship(@PathVariable Long id,
+    public Map<String, String> editInternship(@PathVariable Long id,
                                                 @RequestBody InternshipRegisterDTO body){
+
+        Map<String, String> response = new HashMap<>();
 
         if(body.getAccountId().equals(this.workService.getInternshipById(id).getAccount().getId())){
             Internship k = this.workService.editInternship(id, body.getTitle(), body.getDescription(), body.getSalary(), body.getOpenSpots());
-            return new InternshipResponseDTO(k);
+            if(k!=null){
+                response.put("success", "Internship edited successfully!");
+                return response;
+            }
         }
-        return null;
+
+        response.put("error", "Internship edit failed!");
+        return response;
     }
 
     @PostMapping("/project/{id}")
-    public ProjectResponseDTO editProject(@PathVariable Long id,
+    public Map<String, String> editProject(@PathVariable Long id,
                                           @RequestBody ProjectRegisterDTO body){
+
+        Map<String, String> response = new HashMap<>();
 
         if(body.getAccountId().equals(this.workService.getProjectById(id).getAccount().getId())) {
             Project k = this.workService.editProject(id, body.getTitle(), body.getDescription(), body.getSalary());
-            return new ProjectResponseDTO(k);
+            if(k!=null){
+                response.put("success", "Project edited successfully!");
+                return response;
+            }
         }
-        return null;
+
+        response.put("error", "Project edit failed!");
+        return response;
     }
 }
Index: src/main/java/it/finki/tinki/web/controller/WorkRegisterController.java
===================================================================
--- src/main/java/it/finki/tinki/web/controller/WorkRegisterController.java	(revision 8f1f460ab25fea06236bc61f6c6c2a7a15da2f73)
+++ src/main/java/it/finki/tinki/web/controller/WorkRegisterController.java	(revision 33d4f5d27eea7d3c1f8b9f0284427ed4c8376860)
@@ -1,4 +1,5 @@
 package it.finki.tinki.web.controller;
 
+import it.finki.tinki.model.Users.Account;
 import it.finki.tinki.model.Work.Internship;
 import it.finki.tinki.model.Work.Job;
@@ -10,4 +11,5 @@
 import it.finki.tinki.model.dto.response.work.JobResponseDTO;
 import it.finki.tinki.model.dto.response.work.ProjectResponseDTO;
+import it.finki.tinki.model.enumerator.AccountType;
 import it.finki.tinki.service.WorkService;
 import org.springframework.web.bind.annotation.*;
@@ -26,21 +28,35 @@
     @PostMapping("/job")
     public JobResponseDTO registerJob(@RequestBody JobRegisterDTO body){
-        Job j = this.workService.insertJob(body.getTitle(),
-                body.getDescription(), body.getAccountId(), body.getSalary(), body.getSkillsRequired(), body.getType());
-        return new JobResponseDTO(j);
+
+        if(body.getType() != AccountType.USER){
+            Job j = this.workService.insertJob(body.getTitle(),
+                    body.getDescription(), body.getAccountId(), body.getSalary(), body.getSkillsRequired(), body.getType());
+            return new JobResponseDTO(j);
+        }
+
+        return new JobResponseDTO();
     }
 
     @PostMapping("/internship")
     public InternshipResponseDTO registerInternship(@RequestBody InternshipRegisterDTO body){
-        Internship j = this.workService.insertInternship(body.getTitle(),
-                body.getDescription(), body.getAccountId(), body.getSalary(), body.getSkillsTrained(), body.getOpenSpots(), body.getType());
-        return new InternshipResponseDTO(j);
+        if(body.getType() == AccountType.COMPANY){
+            Internship j = this.workService.insertInternship(body.getTitle(),
+                    body.getDescription(), body.getAccountId(), body.getSalary(), body.getSkillsTrained(), body.getOpenSpots(), body.getType());
+            return new InternshipResponseDTO(j);
+        }
+
+        return new InternshipResponseDTO();
     }
 
     @PostMapping("/project")
     public ProjectResponseDTO registerProject(@RequestBody ProjectRegisterDTO body){
-        Project j = this.workService.insertProject(body.getTitle(),
-                body.getDescription(), body.getAccountId(), body.getSalary(), body.getSkillsRequired(), body.getValidUntil(), body.getType());
-        return new ProjectResponseDTO(j);
+
+        if(body.getType() == AccountType.TEAM){
+            Project j = this.workService.insertProject(body.getTitle(),
+                    body.getDescription(), body.getAccountId(), body.getSalary(), body.getSkillsRequired(), body.getValidUntil(), body.getType());
+            return new ProjectResponseDTO(j);
+        }
+
+        return new ProjectResponseDTO();
     }
 }
