From dfa0d463877718212562928c0ce4ddcc0b6d4a43 Mon Sep 17 00:00:00 2001 From: Martin Varga Date: Mon, 9 Dec 2024 15:50:17 +0100 Subject: [PATCH] Rename functions to match API naming --- server/mergin/sync/public_api_v2.yaml | 6 +++--- server/mergin/sync/public_api_v2_controller.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/mergin/sync/public_api_v2.yaml b/server/mergin/sync/public_api_v2.yaml index 16c71155..a167cb26 100644 --- a/server/mergin/sync/public_api_v2.yaml +++ b/server/mergin/sync/public_api_v2.yaml @@ -105,7 +105,7 @@ paths: tags: - project summary: Get project collaborators - operationId: get_project_members + operationId: get_project_collaborators responses: "200": description: Project members @@ -128,7 +128,7 @@ paths: tags: - project summary: Add project collaborator - operationId: add_project_member + operationId: add_project_collaborator requestBody: required: true content: @@ -174,7 +174,7 @@ paths: tags: - project summary: Update project collaborator - operationId: update_project_member + operationId: update_project_collaborator requestBody: required: true content: diff --git a/server/mergin/sync/public_api_v2_controller.py b/server/mergin/sync/public_api_v2_controller.py index c4e3cd77..d2076910 100644 --- a/server/mergin/sync/public_api_v2_controller.py +++ b/server/mergin/sync/public_api_v2_controller.py @@ -67,7 +67,7 @@ def update_project(id): @auth_required -def get_project_members(id): +def get_project_collaborators(id): """Get project collaborators, with both direct role and inherited role from workspace""" project = require_project_by_uuid(id, ProjectPermissions.Update) project_members = [] @@ -89,7 +89,7 @@ def get_project_members(id): @auth_required -def add_project_member(id): +def add_project_collaborator(id): """Add project collaborator""" project = require_project_by_uuid(id, ProjectPermissions.Update) user = User.get_by_login(request.json["username"]) @@ -107,7 +107,7 @@ def add_project_member(id): @auth_required -def update_project_member(id, user_id): +def update_project_collaborator(id, user_id): """Update project collaborator""" project = require_project_by_uuid(id, ProjectPermissions.Update) user = User.query.filter_by(id=user_id, active=True).first_or_404()