Skip to content

Commit 503f81b

Browse files
committed
Merge branch '427-edit-template-use-cases' of https://github.com/IQSS/dataverse-client-javascript into 427-edit-template-use-cases
2 parents 2c483e5 + 70d0228 commit 503f81b

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

src/templates/domain/useCases/UpdateTemplateLicenseTerms.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ export class UpdateTemplateLicenseTerms implements UseCase<void> {
99
this.templatesRepository = templatesRepository
1010
}
1111

12+
/**
13+
* Updates the license terms for a template with the given identifier.
14+
*
15+
* @param {number} templateId - The unique identifier of the template to update.
16+
* @param {UpdateTemplateLicenseTermsDTO} payload - The license terms data to apply to the template.
17+
* @returns {Promise<void>} A promise that resolves when the license terms have been updated.
18+
*/
1219
async execute(templateId: number, payload: UpdateTemplateLicenseTermsDTO): Promise<void> {
1320
return await this.templatesRepository.updateTemplateLicenseTerms(templateId, payload)
1421
}

src/templates/domain/useCases/UpdateTemplateTermsOfAccess.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ export class UpdateTemplateTermsOfAccess implements UseCase<void> {
99
this.templatesRepository = templatesRepository
1010
}
1111

12+
/**
13+
* Updates the terms of access for a template with the given identifier.
14+
*
15+
* @param {number} templateId - The unique identifier of the template to update.
16+
* @param {TermsOfAccess} termsOfAccess - The new terms of access to apply to the template.
17+
* @returns {Promise<void>} A promise that resolves when the terms of access have been updated.
18+
*/
1219
async execute(templateId: number, termsOfAccess: TermsOfAccess): Promise<void> {
1320
return await this.templatesRepository.updateTemplateTermsOfAccess(templateId, termsOfAccess)
1421
}

0 commit comments

Comments
 (0)