You are here

function _push_notifications_service_delete_device_token in Push Notifications 7

Deletes an already registered token.

Parameters

$data:

Return value

array|mixed

1 string reference to '_push_notifications_service_delete_device_token'
push_notifications_services_resources in ./push_notifications.module
Implements hook_services_resources().

File

includes/push_notifications.service.inc, line 92
Services callbacks.

Code

function _push_notifications_service_delete_device_token($token) {
  if (empty($token)) {
    return services_error(t('Token parameter is missing.'), 400);
  }
  push_notifications_purge_token($token);
  return array(
    'success' => 1,
    'message' => 'The token was successfully removed from the database.',
  );
}