Skip to content

API for managing project–organisation relationships#55

Open
LabibaVIC wants to merge 7 commits into
masterfrom
fablihatasneem/feature/tree-types
Open

API for managing project–organisation relationships#55
LabibaVIC wants to merge 7 commits into
masterfrom
fablihatasneem/feature/tree-types

Conversation

@LabibaVIC
Copy link
Copy Markdown
Collaborator

@LabibaVIC LabibaVIC commented May 15, 2026

This PR introduces an API for managing relationships between projects and organisations.

It includes:

Create relationship between project and organisation
Fetch all project–organisation relationships
Duplicate relationship prevention at application level
Safe handling of Prisma foreign key constraints
Consistent API response structure across endpoints
Improvements
Implemented duplicate prevention for relationships before insertion
Added structured error handling using try/catch blocks
Handled Prisma constraint errors safely
Ensured consistent response format across endpoints
Testing
Verified successful creation of relationship using POST endpoint
Verified duplicate prevention works as expected
Verified GET endpoint returns all relationships correctly
Confirmed API handles invalid requests without crashing server

@LabibaVIC LabibaVIC changed the title Add project-organisation API with Prisma schema and routes API for managing project–organisation relationships May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant