Fix namespaces

ogrepository-fixes
Vadim vtroshchinskiy 2025-01-17 09:50:47 +01:00
parent dc59b33e8a
commit 6491757535
2 changed files with 8 additions and 7 deletions

View File

@ -44,6 +44,7 @@ Python documentation can be generated using a utility like pdoc3 (there are mult
The gitapi is designed to run within an existing opengnsys environment. It should be installed in an ogrepository. The gitapi is designed to run within an existing opengnsys environment. It should be installed in an ogrepository.
## API Examples ## API Examples
### Get list of branches ### Get list of branches

View File

@ -174,7 +174,7 @@ class GitLib(Resource):
"message": "OpenGnsys Git API" "message": "OpenGnsys Git API"
} }
@git_ns.route('/oggit/v1/repositories') @git_ns.route('/repositories')
class GitRepositories(Resource): class GitRepositories(Resource):
def get(self): def get(self):
""" """
@ -248,7 +248,7 @@ class GitRepositories(Resource):
return jsonify({"status": "Repository created"}), 201 return jsonify({"status": "Repository created"}), 201
@git_ns.route('/oggit/v1/repositories/<repo>/sync') @git_ns.route('/repositories/<repo>/sync')
class GitRepoSync(Resource): class GitRepoSync(Resource):
def post(self, repo): def post(self, repo):
""" """
@ -283,7 +283,7 @@ class GitRepoSync(Resource):
@git_ns.route('/oggit/v1/repositories/<repo>/backup') @git_ns.route('/repositories/<repo>/backup')
class GitRepoBackup(Resource): class GitRepoBackup(Resource):
def backup_repository(self, repo): def backup_repository(self, repo):
""" """
@ -328,7 +328,7 @@ class GitRepoBackup(Resource):
return jsonify({"status": "started", "task_id" : task_id}), 200 return jsonify({"status": "started", "task_id" : task_id}), 200
@git_ns.route('/oggit/v1/repositories/<repo>/compact', methods=['POST']) @git_ns.route('/repositories/<repo>/compact', methods=['POST'])
class GitRepoCompact(Resource): class GitRepoCompact(Resource):
def post(self, repo): def post(self, repo):
""" """
@ -357,7 +357,7 @@ class GitRepoCompact(Resource):
return jsonify({"status": "started", "task_id" : task_id}), 200 return jsonify({"status": "started", "task_id" : task_id}), 200
@git_ns.route('/oggit/v1/tasks/<task_id>/status') @git_ns.route('/tasks/<task_id>/status')
class GitTaskStatus(Resource): class GitTaskStatus(Resource):
def get(self, task_id): def get(self, task_id):
""" """
@ -385,7 +385,7 @@ class GitTaskStatus(Resource):
@git_ns.route('/oggit/v1/repositories/<repo>', methods=['DELETE']) @git_ns.route('/repositories/<repo>', methods=['DELETE'])
class GitRepo(Resource): class GitRepo(Resource):
def delete(self, repo): def delete(self, repo):
""" """
@ -414,7 +414,7 @@ class GitRepo(Resource):
@git_ns.route('/oggit/v1/repositories/<repo>/branches') @git_ns.route('/repositories/<repo>/branches')
class GitRepoBranches(Resource): class GitRepoBranches(Resource):
def get(self, repo): def get(self, repo):
""" """