Skip to content

Commit

Permalink
test(api): clone skill route
Browse files Browse the repository at this point in the history
Co-authored-by: Iris Benoit-Martin <[email protected]>
Co-authored-by: Laura Bergoens <[email protected]>
Co-authored-by: Jérémie Jadé <[email protected]>
Co-authored-by: Nicolas Lepage <[email protected]>
Co-authored-by: Gwenvaël Laskar <[email protected]>
  • Loading branch information
6 people committed Feb 4, 2025
1 parent 4eb6d9e commit 3455729
Show file tree
Hide file tree
Showing 6 changed files with 451 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/lib/application/airtable-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const AIRTABLE_BASE_URL = 'https://api.airtable.com/v0';
const AIRTABLE_PROXY_TABLES = [
'Thematiques',
'Tubes',
'Acquis',
'Acquis', // todo delete
'Tutoriels',
'Tags',
'Attachments',
Expand Down
1 change: 1 addition & 0 deletions api/lib/application/skills/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export async function register(server) {
validate: {
payload: Joi.object({
data: {
type: Joi.string().required().equal('skills'),
attributes: {
tubeDestinationId: Types.tubeId().required(),
skillIdToClone: Types.skillId().required(),
Expand Down
1 change: 1 addition & 0 deletions api/lib/domain/models/Skill.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export class Skill {
competenceId: tubeDestination.competenceId,
status: Skill.STATUSES.EN_CONSTRUCTION,
description: this.description,
descriptionStatus: this.descriptionStatus,
hint_i18n: this.hint_i18n,
hintStatus: this.hintStatus,
tutorialIds: this.tutorialIds,
Expand Down
1 change: 0 additions & 1 deletion api/lib/domain/usecases/clone-skill.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export async function cloneSkill({
skillRepository,
attachmentRepository,
});

const {
clonedSkill,
clonedChallenges,
Expand Down
Loading

0 comments on commit 3455729

Please sign in to comment.