backend::service::map_collaborator

Function create

source
pub async fn create(
    map_and_collaborator: (i32, NewMapCollaboratorDto),
    user_id: Uuid,
    pool: &SharedPool,
    keycloak_api: &SharedKeycloakApi,
    http_client: &SharedHttpClient,
) -> Result<MapCollaboratorDto, ServiceError>
Expand description

Create a new collaborator for a map.

ยงErrors

  • If the user tries to add themselves as a collaborator.
  • If the user is not the creator of the map.
  • If the map already has 30 collaborators.
  • If the connection to the database could not be established.
  • If the connection to the Keycloak API could not be established.