src/main/java/com/kshrd/derphsar_api/rest/restcontroller/UserRestController.java
/**
     * Delete a user
     *
     * @param userId - Id of a user
     * @return - Return response message
     */
Delete a user
@param userId - Id of a user
@return - Return response message
Delete a user @param userId - Id of a user @return - Return response message
@DeleteMapping("admin/users/{userId}")
    @ApiOperation(value = "delete a user", response = UserResponseModel.class)
    public ResponseEntity<BaseApiNoPaginationResponse<Void>> deleteUser(@PathVariable("userId") String userId){
        BaseApiNoPaginationResponse<Void> response = new BaseApiNoPaginationResponse<>();
        try{
            userServiceImp.deleteUserById(userId);
            response.setMessage(message.deleted("User"));
            response.setStatus(HttpStatus.OK);
            response.setTime(new Timestamp(System.currentTimeMillis()));
        }catch (Exception e){
            response.setMessage(message.deleteError("User"));
            response.setData(null);
            response.setStatus(HttpStatus.BAD_REQUEST);
        }
        return ResponseEntity.ok(response);
    }
@ DeleteMapping ( "admin/users/{userId}" ) @ ApiOperation ( value = "delete a user" , response = UserResponseModel . class ) public ResponseEntity < BaseApiNoPaginationResponse < Void > > deleteUser ( @ PathVariable ( "userId" ) String userId ) { BaseApiNoPaginationResponse < Void > response = new BaseApiNoPaginationResponse < > ( ) ; try { userServiceImp . deleteUserById ( userId ) ; response . setMessage ( message . deleted ( "User" ) ) ; response . setStatus ( HttpStatus . OK ) ; response . setTime ( new Timestamp ( System . currentTimeMillis ( ) ) ) ; } catch ( Exception e ) { response . setMessage ( message . deleteError ( "User" ) ) ; response . setData ( null ) ; response . setStatus ( HttpStatus . BAD_REQUEST ) ; } return ResponseEntity . ok ( response ) ; }
Delete a user
 @param userId - Id of a user
 @return - Return response message
Delete a user @param userId - Id of a user @return - Return response message