2024-04-26 12:07:11 +02:00
|
|
|
import type {
|
|
|
|
IProjectOwnersReadModel,
|
2024-08-19 08:46:50 +02:00
|
|
|
IProjectForUiWithOwners,
|
2024-04-26 12:07:11 +02:00
|
|
|
} from './project-owners-read-model.type';
|
2024-08-19 08:46:50 +02:00
|
|
|
import type { ProjectForUi } from './project-read-model-type';
|
2024-04-26 12:07:11 +02:00
|
|
|
|
|
|
|
export class FakeProjectOwnersReadModel implements IProjectOwnersReadModel {
|
|
|
|
async addOwners(
|
2024-08-19 08:46:50 +02:00
|
|
|
projects: ProjectForUi[],
|
|
|
|
): Promise<IProjectForUiWithOwners[]> {
|
2024-04-26 12:07:11 +02:00
|
|
|
return projects.map((project) => ({
|
|
|
|
...project,
|
|
|
|
owners: [{ ownerType: 'system' }],
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
}
|