Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions app/routes/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,15 @@ def start_scan(project_id):
db.session.commit()
run_scan(current_app._get_current_object(), scan.id)
return jsonify({"scan_id": scan.id, "status": "queued"}), 202


@projects_bp.route("/projects/<int:project_id>", methods=["GET"])
@login_required
def detail_project(project_id):
project = Project.query.get(project_id)
if project is None:
return jsonify({"error": "Проект не найден"}), 404

if project.owner_id != current_user.id:
abort(403)
return render_template("projects/projectDetail.html", project=project)
1 change: 1 addition & 0 deletions app/templates/projects/projectDetail.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% extends "base.html" %}
Loading