diff --git a/app/views.py b/app/views.py index 42ef5bf..5a2d7df 100644 --- a/app/views.py +++ b/app/views.py @@ -644,6 +644,27 @@ def domain_dnssec(domain_name): dnssec = domain.get_domain_dnssec(domain_name) return make_response(jsonify(dnssec), 200) +@app.route('/domain//dnssec/enable', methods=['GET']) +@login_required +def domain_dnssec_enable(domain_name): + if not current_user.can_access_domain(domain_name): + return make_response(jsonify({'status': 'error', 'msg': 'You do not have access to that domain'}), 403) + + domain = Domain() + dnssec = domain.enable_domain_dnssec(domain_name) + return make_response(jsonify(dnssec), 200) + +@app.route('/domain//dnssec/disable', methods=['GET']) +@login_required +def domain_dnssec_disable(domain_name): + if not current_user.can_access_domain(domain_name): + return make_response(jsonify({'status': 'error', 'msg': 'You do not have access to that domain'}), 403) + + domain = Domain() + dnssec = domain.get_domain_dnssec(domain_name) + return make_response(jsonify({'status': 'error', 'msg': 'Function not implemented'}), 400) + #return make_response(jsonify(dnssec), 200) + @app.route('/domain//managesetting', methods=['GET', 'POST']) @login_required @admin_role_required