mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Port over project request payloads to DTOs (#12528)
This commit is contained in:
committed by
GitHub
parent
44679b42aa
commit
5f1adefca7
@@ -1,10 +1,10 @@
|
||||
import type { ProjectRole } from '@n8n/api-types';
|
||||
import { Container } from '@n8n/di';
|
||||
import type { Scope } from '@n8n/permissions';
|
||||
import { EntityNotFoundError } from '@n8n/typeorm';
|
||||
|
||||
import { ActiveWorkflowManager } from '@/active-workflow-manager';
|
||||
import type { Project } from '@/databases/entities/project';
|
||||
import type { ProjectRole } from '@/databases/entities/project-relation';
|
||||
import type { GlobalRole } from '@/databases/entities/user';
|
||||
import { ProjectRelationRepository } from '@/databases/repositories/project-relation.repository';
|
||||
import { ProjectRepository } from '@/databases/repositories/project.repository';
|
||||
@@ -177,11 +177,7 @@ describe('GET /projects/my-projects', () => {
|
||||
//
|
||||
// ACT
|
||||
//
|
||||
const resp = await testServer
|
||||
.authAgentFor(testUser1)
|
||||
.get('/projects/my-projects')
|
||||
.query({ includeScopes: true })
|
||||
.expect(200);
|
||||
const resp = await testServer.authAgentFor(testUser1).get('/projects/my-projects').expect(200);
|
||||
const respProjects: Array<Project & { role: ProjectRole | GlobalRole; scopes?: Scope[] }> =
|
||||
resp.body.data;
|
||||
|
||||
@@ -258,11 +254,7 @@ describe('GET /projects/my-projects', () => {
|
||||
//
|
||||
// ACT
|
||||
//
|
||||
const resp = await testServer
|
||||
.authAgentFor(ownerUser)
|
||||
.get('/projects/my-projects')
|
||||
.query({ includeScopes: true })
|
||||
.expect(200);
|
||||
const resp = await testServer.authAgentFor(ownerUser).get('/projects/my-projects').expect(200);
|
||||
const respProjects: Array<Project & { role: ProjectRole | GlobalRole; scopes?: Scope[] }> =
|
||||
resp.body.data;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user