You are here

function webform_service_resource_delete in Webform Service 7.4

Same name and namespace in other branches
  1. 6.3 resources/webform_resource.inc \webform_service_resource_delete()

Delete a node given its nid.

Parameters

$nid: Node ID of the node we're deleting.

Return value

The node's nid.

1 string reference to 'webform_service_resource_delete'
_webform_resource_definition in resources/webform_resource.inc
The webform resource definition.

File

resources/webform_resource.inc, line 254

Code

function webform_service_resource_delete($uuid) {
  if ($node = webform_service_resource_load($uuid)) {
    node_delete($node->nid);
    return TRUE;
  }
  else {
    return services_error(t('@uuid could not be found', array(
      '@uuid' => $uuid,
    )), 404);
  }
}