Skip to content

Commit

Permalink
fix: rename keys in dto
Browse files Browse the repository at this point in the history
  • Loading branch information
nataszczypiora committed Jul 18, 2023
1 parent 8563021 commit 61aadab
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
27 changes: 20 additions & 7 deletions src/learning-path/dto/learning-path.dto.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
export interface LearningPathDto {
readonly _id: string;
readonly id: string;
readonly name: string;
readonly slug: string;
readonly metadata?: Record<string, unknown>;
readonly fork_id?: string;
readonly metadata?: Metadata;
readonly forkId?: string;
readonly status: string;
readonly created_namespace_id?: string;
readonly created_by: string;
readonly created_at: string;
readonly updated_at: string;
readonly namespaceId?: string;
readonly createdBy: string;
readonly createdAt: string;
readonly updatedAt: string;
}

interface Metadata {
readonly description?: string;
readonly descriptionInstructor?: string;
readonly author?: string;
readonly coverId?: string;
readonly coverAlt?: string;
readonly coverCopyright?: string;
readonly bannerId?: string;
readonly bannerAlt?: string;
readonly bannerCopyright?: string;
readonly duration?: number;
}
8 changes: 4 additions & 4 deletions test/data/learning-path-data.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { LearningPathDto } from '../../src/learning-path/dto/learning-path.dto';

export const learningPath: LearningPathDto = {
_id: 'b942d4de-921c-4406-abbd-464dabb7b323',
id: 'b942d4de-921c-4406-abbd-464dabb7b323',
name: 'name',
slug: 'slug',
status: 'status',
created_by: 'created_by',
created_at: 'created_at',
updated_at: 'updated_at',
createdBy: 'created_by',
createdAt: 'created_at',
updatedAt: 'updated_at',
};

0 comments on commit 61aadab

Please sign in to comment.