src/main/java/br/ufpa/labes/spm/web/rest/WorkGroupResource.java
@PutMapping("/work-groups")
  public ResponseEntity<WorkGroup> updateWorkGroup(@Valid @RequestBody WorkGroup workGroup)
      throws URISyntaxException {
    log.debug("REST request to update WorkGroup : {}", workGroup);
    if (workGroup.getId() == null) {
      throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
    }
    WorkGroup result = workGroupRepository.save(workGroup);
    return ResponseEntity.ok()
        .headers(
            HeaderUtil.createEntityUpdateAlert(
                applicationName, true, ENTITY_NAME, workGroup.getId().toString()))
        .body(result);
  }
/**
   * {@code PUT /work-groups} : Updates an existing workGroup.
   *
   * @param workGroup the workGroup to update.
   * @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the updated
   *     workGroup, or with status {@code 400 (Bad Request)} if the workGroup is not valid, or with
   *     status {@code 500 (Internal Server Error)} if the workGroup couldn't be updated.
   * @throws URISyntaxException if the Location URI syntax is incorrect.
   */
PUT /work-groups : Updates an existing workGroup.
@param workGroup the workGroup to update.
@return the  ResponseEntity with status  200 (OK) and with body the updated
workGroup, or with status  400 (Bad Request) if the workGroup is not valid, or with
status  500 (Internal Server Error) if the workGroup couldn't be updated.
@throws URISyntaxException if the Location URI syntax is incorrect.
PUT / work - groups : Updates an existing workGroup . @param workGroup the workGroup to update . @return the ResponseEntity with status 200 ( OK ) and with body the updated workGroup or with status 400 ( Bad Request ) if the workGroup is not valid or with status 500 ( Internal Server Error ) if the workGroup couldn ' t be updated . @throws URISyntaxException if the Location URI syntax is incorrect .
@PutMapping("/work-groups")
  public ResponseEntity<WorkGroup> updateWorkGroup(@Valid @RequestBody WorkGroup workGroup)
      throws URISyntaxException {
    log.debug("REST request to update WorkGroup : {}", workGroup);
    if (workGroup.getId() == null) {
      throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
    }
    WorkGroup result = workGroupRepository.save(workGroup);
    return ResponseEntity.ok()
        .headers(
            HeaderUtil.createEntityUpdateAlert(
                applicationName, true, ENTITY_NAME, workGroup.getId().toString()))
        .body(result);
  }
@ PutMapping ( "/work-groups" ) public ResponseEntity < WorkGroup > updateWorkGroup ( @ Valid @ RequestBody WorkGroup workGroup ) throws URISyntaxException { log . debug ( "REST request to update WorkGroup : {}" , workGroup ) ; if ( workGroup . getId ( ) == null ) { throw new BadRequestAlertException ( "Invalid id" , ENTITY_NAME , "idnull" ) ; } WorkGroup result = workGroupRepository . save ( workGroup ) ; return ResponseEntity . ok ( ) . headers ( HeaderUtil . createEntityUpdateAlert ( applicationName , true , ENTITY_NAME , workGroup . getId ( ) . toString ( ) ) ) . body ( result ) ; }
{@code PUT /work-groups} : Updates an existing workGroup.
{ @code PUT / work - groups } : Updates an existing workGroup .