예제 #1
0
def mark_hidden(request, unit_type, unit_uuid):
    """
    Mark a unit as deleted and hide it in the dashboard.

    This is just a wrapper around unit.views.mark_hidden that verifies API auth.

    :param unit_type: 'transfer' or 'ingest' for a Transfer or SIP respectively
    :param unit_uuid: UUID of the Transfer or SIP
    """
    return unit_views.mark_hidden(request, unit_type, unit_uuid)
예제 #2
0
def mark_hidden(request, unit_type, unit_uuid):
    """
    Mark a unit as deleted and hide it in the dashboard.

    This is just a wrapper around unit.views.mark_hidden that verifies API auth.

    :param unit_type: 'transfer' or 'ingest' for a Transfer or SIP respectively
    :param unit_uuid: UUID of the Transfer or SIP
    """
    auth_error = authenticate_request(request)
    response = {}
    if auth_error is not None:
        response = {'message': auth_error, 'error': True}
        return django.http.HttpResponseForbidden(
            json.dumps(response), content_type='application/json')
    return unit_views.mark_hidden(request, unit_type, unit_uuid)