diff options
author | John Nduli | 2024-09-05 02:09:50 +0300 |
---|---|---|
committer | BonfaceKilz | 2024-09-17 11:42:15 +0300 |
commit | 6857bed21319f88895404548a10e010d5cbe1a02 (patch) | |
tree | f714e90bb41091d87aac4125ffb125aedfefe63d /gn3/api/metadata_api | |
parent | 6e23a22c4a60c9238b23d38f586f3de2aa9048f9 (diff) | |
download | genenetwork3-6857bed21319f88895404548a10e010d5cbe1a02.tar.gz |
feat: require auth for edit api call
Diffstat (limited to 'gn3/api/metadata_api')
-rw-r--r-- | gn3/api/metadata_api/wiki.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gn3/api/metadata_api/wiki.py b/gn3/api/metadata_api/wiki.py index 6436f3d..72bbda2 100644 --- a/gn3/api/metadata_api/wiki.py +++ b/gn3/api/metadata_api/wiki.py @@ -2,6 +2,7 @@ import datetime from typing import Any, Dict +from gn3.auth.authorisation.oauth2.resource_server import require_oauth from flask import Blueprint, request, jsonify, current_app, make_response from gn3 import db_utils from gn3.db import wiki @@ -13,6 +14,7 @@ wiki_blueprint = Blueprint("wiki", __name__, url_prefix="wiki") @wiki_blueprint.route("/<int:comment_id>/edit", methods=["POST"]) +@require_oauth("profile") def edit_wiki(comment_id: int): """Edit wiki comment. This is achieved by adding another entry with a new VersionId""" # FIXME: attempt to check and fix for types here with relevant errors |