Changing return to void for delete action

This commit is contained in:
Martin Stockhammer 2020-08-04 18:06:49 +02:00
parent f24695020b
commit bcdc1f24b6
3 changed files with 3 additions and 4 deletions

View File

@ -117,7 +117,7 @@ public interface GroupService
@ApiResponse( responseCode = "404", description = "Group mapping not found" )
}
)
ActionStatus removeGroupMapping( @Parameter( description = "The group name", required = true )
void removeGroupMapping( @Parameter( description = "The group name", required = true )
@PathParam( "group" ) String group )
throws RedbackServiceException;

View File

@ -201,7 +201,7 @@ public class DefaultGroupService
}
@Override
public ActionStatus removeGroupMapping( String group )
public void removeGroupMapping( String group )
throws RedbackServiceException
{
try
@ -213,7 +213,7 @@ public class DefaultGroupService
log.error( e.getMessage(), e );
throw new RedbackServiceException( ErrorMessage.of( ERR_ROLE_MAPPING, e.getMessage( ) ) );
}
return ActionStatus.SUCCESS;
response.setStatus( 200 );
}
@Override

View File

@ -454,7 +454,6 @@ public class NativeGroupServiceTest extends AbstractNativeRestServices
.delete( "/mappings/archiva-admin" )
.then( )
.statusCode( 200 ).extract( ).response( );
assertTrue( response.getBody( ).jsonPath( ).getBoolean( "success" ) );
} finally {
// Put it back
Map<String, Object> jsonAsMap = new HashMap<>( );