Skip to content

Commit

Permalink
Rename functions to match API naming
Browse files Browse the repository at this point in the history
  • Loading branch information
varmar05 committed Dec 9, 2024
1 parent 56cd008 commit dfa0d46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions server/mergin/sync/public_api_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ paths:
tags:
- project
summary: Get project collaborators
operationId: get_project_members
operationId: get_project_collaborators
responses:
"200":
description: Project members
Expand All @@ -128,7 +128,7 @@ paths:
tags:
- project
summary: Add project collaborator
operationId: add_project_member
operationId: add_project_collaborator
requestBody:
required: true
content:
Expand Down Expand Up @@ -174,7 +174,7 @@ paths:
tags:
- project
summary: Update project collaborator
operationId: update_project_member
operationId: update_project_collaborator
requestBody:
required: true
content:
Expand Down
6 changes: 3 additions & 3 deletions server/mergin/sync/public_api_v2_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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"])
Expand All @@ -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()
Expand Down

0 comments on commit dfa0d46

Please sign in to comment.