feat : user
This commit is contained in:
@@ -19,6 +19,11 @@ use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
])]
|
||||
class EmployeeController
|
||||
{
|
||||
/**
|
||||
* @param EmployeeRequest $request
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
#[RequestMapping(path: "add", methods: "POST")]
|
||||
#[Scene(scene: "add")]
|
||||
public function add(EmployeeRequest $request)
|
||||
@@ -26,6 +31,10 @@ class EmployeeController
|
||||
return (new EmployeeService)->add();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param EmployeeRequest $request
|
||||
* @return array
|
||||
*/
|
||||
#[RequestMapping(path: "edit", methods: "POST")]
|
||||
#[Scene(scene: "edit")]
|
||||
public function edit(EmployeeRequest $request)
|
||||
@@ -33,24 +42,48 @@ class EmployeeController
|
||||
return (new EmployeeService)->edit();
|
||||
}
|
||||
|
||||
#[RequestMapping(path: "del", methods: "POST")]
|
||||
/**
|
||||
* @param EmployeeRequest $request
|
||||
* @return array
|
||||
*/
|
||||
#[RequestMapping(path: "del", methods: "GET")]
|
||||
#[Scene(scene: "del")]
|
||||
public function delete(EmployeeRequest $request)
|
||||
{
|
||||
return (new EmployeeService)->delete();
|
||||
}
|
||||
|
||||
#[RequestMapping(path: "list", methods: "POST")]
|
||||
/**
|
||||
* @param EmployeeRequest $request
|
||||
* @return array
|
||||
*/
|
||||
#[RequestMapping(path: "list", methods: "GET")]
|
||||
#[Scene(scene: "list")]
|
||||
public function list(EmployeeRequest $request)
|
||||
{
|
||||
return (new EmployeeService)->handle();
|
||||
}
|
||||
|
||||
#[RequestMapping(path: "info", methods: "POST")]
|
||||
/**
|
||||
* @param EmployeeRequest $request
|
||||
* @return array
|
||||
*/
|
||||
#[RequestMapping(path: "info", methods: "GET")]
|
||||
#[Scene(scene: "info")]
|
||||
public function info(EmployeeRequest $request)
|
||||
{
|
||||
return (new EmployeeService)->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param EmployeeRequest $request
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
#[RequestMapping(path: "reset_password", methods: "GET")]
|
||||
#[Scene(scene: "reset_password")]
|
||||
public function resetPassword(EmployeeRequest $request)
|
||||
{
|
||||
return (new EmployeeService)->resetPassword();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user