Commits

Sebastian Sdorra committed 7831cd3

added delete method

  • Participants
  • Parent commits f988a3b

Comments (0)

Files changed (1)

File scm-webapp/src/main/java/sonia/scm/api/rest/resources/GroupsResource.java

 import javax.inject.Singleton;
 
 import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.PUT;
    * Method description
    *
    *
+   * @param name
+   *
+   * @return
+   */
+  @DELETE
+  @Path("{name}")
+  public Response delete(@PathParam("name") String name)
+  {
+    Group group = groupStore.get(name);
+
+    if (group == null)
+    {
+      throw new WebApplicationException(Status.NOT_FOUND);
+    }
+
+    return Response.noContent().build();
+  }
+
+  /**
+   * Method description
+   *
+   *
    *
    * @param name
    * @param group