Skip to content

Commit

Permalink
Merge branch 'develop' into lint-platform
Browse files Browse the repository at this point in the history
  • Loading branch information
DhairyaMajmudar authored Jul 27, 2024
2 parents fffadae + 92daef9 commit bc55f6f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions apps/api/src/project/controller/project.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions apps/api/src/project/project.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit bc55f6f

Please sign in to comment.