diff --git a/apps/api/src/project/controller/project.controller.ts b/apps/api/src/project/controller/project.controller.ts index bcc8fa51..7c947dc0 100644 --- a/apps/api/src/project/controller/project.controller.ts +++ b/apps/api/src/project/controller/project.controller.ts @@ -68,7 +68,7 @@ export class ProjectController { return await this.service.forkProject(user, projectId, forkMetadata) } - @Put(':projectId/sync-fork') + @Put(':projectId/fork') @RequiredApiKeyAuthorities(Authority.READ_PROJECT, Authority.UPDATE_PROJECT) async syncFork( @CurrentUser() user: User, @@ -78,7 +78,7 @@ export class ProjectController { return await this.service.syncFork(user, projectId, hardSync) } - @Put(':projectId/unlink-fork') + @Delete(':projectId/fork') @RequiredApiKeyAuthorities(Authority.UPDATE_PROJECT) async unlinkFork( @CurrentUser() user: User, diff --git a/apps/api/src/project/project.e2e.spec.ts b/apps/api/src/project/project.e2e.spec.ts index 698dfb6e..4bbb40c2 100644 --- a/apps/api/src/project/project.e2e.spec.ts +++ b/apps/api/src/project/project.e2e.spec.ts @@ -1441,7 +1441,7 @@ describe('Project Controller Tests', () => { // Sync the fork await app.inject({ method: 'PUT', - url: `/project/${forkedProject.id}/sync-fork`, + url: `/project/${forkedProject.id}/fork`, headers: { 'x-e2e-user-email': user2.email } @@ -1631,7 +1631,7 @@ describe('Project Controller Tests', () => { // Sync the fork await app.inject({ method: 'PUT', - url: `/project/${forkedProject.id}/sync-fork?hardSync=true`, + url: `/project/${forkedProject.id}/fork?hardSync=true`, headers: { 'x-e2e-user-email': user2.email } @@ -1666,7 +1666,7 @@ describe('Project Controller Tests', () => { it('should not be able to sync a project that is not forked', async () => { const response = await app.inject({ method: 'PUT', - url: `/project/${project3.id}/sync-fork`, + url: `/project/${project3.id}/fork`, headers: { 'x-e2e-user-email': user1.email } @@ -1690,8 +1690,8 @@ describe('Project Controller Tests', () => { ) const response = await app.inject({ - method: 'PUT', - url: `/project/${forkedProject.id}/unlink-fork`, + method: 'DELETE', + url: `/project/${forkedProject.id}/fork`, headers: { 'x-e2e-user-email': user2.email }