Skip to content

Commit

Permalink
Some changes have been made.
Browse files Browse the repository at this point in the history
  • Loading branch information
CerenBdk committed Jun 2, 2021
1 parent b65b92d commit fa5a778
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import kodlamaio.hrms.business.abstracts.EmployeeService;
Expand Down Expand Up @@ -39,12 +39,12 @@ public EmployeesController(EmployeeService employeeService) {
// }
//
// @PostMapping("/delete")
// public Result delete(@PathVariable("id") int id){
// public Result delete(@RequestParam("id") int id){
// return this.employeeService.delete(id);
// }
//
// @GetMapping("/getbyid")
// public DataResult<Employee> getById(@PathVariable("id") int id){
// public DataResult<Employee> getById(@RequestParam("id") int id){
// return this.employeeService.getById(id);
// }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import kodlamaio.hrms.business.abstracts.EmployerService;
Expand Down Expand Up @@ -38,12 +38,12 @@ public Result add(@RequestBody Employer employer){
// }
//
// @PostMapping("/delete")
// public Result delete(@PathVariable("id") int id){
// public Result delete(@RequestParam("id") int id){
// return this.employerService.delete(id);
// }
//
// @GetMapping("/getbyid")
// public DataResult<Employer> getById(@PathVariable("id") int id){
// public DataResult<Employer> getById(@RequestParam("id") int id){
// return this.employerService.getById(id);
// }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
Expand Down Expand Up @@ -41,12 +40,12 @@ public Result add(@RequestBody JobAdvert jobAdvert){
// }
//
// @PostMapping("/delete")
// public Result delete(@PathVariable("id") int id){
// public Result delete(@RequestParam("id") int id){
// return this.jobAdvertService.delete(id);
// }
//
@GetMapping("/getbyid")
public DataResult<JobAdvert> getById(int id){
public DataResult<JobAdvert> getById(@RequestParam int id){
return this.jobAdvertService.getById(id);
}

Expand All @@ -56,7 +55,7 @@ public DataResult<List<JobAdvert>> getAll(){
}

@PostMapping("/changeOpenToClose")
public Result changeOpenToClose(int id){
public Result changeOpenToClose(@RequestParam int id){
return this.jobAdvertService.changeOpenToClose(id);
}

Expand All @@ -71,7 +70,7 @@ public DataResult<List<JobAdvert>> findAllByOrderByPublishedAt(){
}

@GetMapping("/getAllOpenJobAdvertByEmployer")
public DataResult<List<JobAdvert>> getAllOpenJobAdvertByEmployer(int id){
public DataResult<List<JobAdvert>> getAllOpenJobAdvertByEmployer(@RequestParam int id){
return this.jobAdvertService.getAllOpenJobAdvertByEmployer(id);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import kodlamaio.hrms.business.abstracts.JobPositionService;
Expand Down Expand Up @@ -39,12 +39,12 @@ public Result add(@RequestBody JobPosition jobPosition){
// }
//
// @PostMapping("/delete")
// public Result delete(@PathVariable("id") int id){
// public Result delete(@RequestParam("id") int id){
// return this.jobPositionService.delete(id);
// }
//
// @GetMapping("/getbyid")
// public DataResult<JobPosition> getById(@PathVariable("id") int id){
// public DataResult<JobPosition> getById(@RequestParam("id") int id){
// return this.jobPositionService.getById(id);
// }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import kodlamaio.hrms.business.abstracts.UserService;
Expand Down Expand Up @@ -38,12 +38,12 @@ public UsersController(UserService userService) {
// }
//
// @PostMapping("/delete")
// public Result delete(@PathVariable("id") int id){
// public Result delete(@RequestParam("id") int id){
// return this.userService.delete(id);
// }
//
// @GetMapping("/getbyid")
// public DataResult<User> getById(@PathVariable("id") int id){
// public DataResult<User> getById(@RequestParam("id") int id){
// return this.userService.getById(id);
// }
//
Expand Down

0 comments on commit fa5a778

Please sign in to comment.