'Archives a dashboard.
:qparam string slug: Slug of dashboard to retrieve.
Responds with the archived :ref:`dashboard <dashboard-response-label>`.'

@require_permission('edit_dashboard')
def delete(self, dashboard_slug):

    dashboard = models.Dashboard.get_by_slug_and_org(dashboard_slug, self.current_org)
    dashboard.is_archived = True
    dashboard.record_changes(changed_by=self.current_user)
    models.db.session.add(dashboard)
    d = dashboard.to_dict(with_widgets=True, user=self.current_user)
    models.db.session.commit()
    return d
