MCPcopy Create free account
hub / github.com/linuxfoundation/crowd.dev / import

Method import

backend/src/services/tenantService.ts:550–565  ·  view source on GitHub ↗
(data, importHash)

Source from the content-addressed store, hash-verified

548 }
549
550 async import(data, importHash) {
551 if (!importHash) {
552 throw new Error400(this.options.language, 'importer.errors.importHashRequired')
553 }
554
555 if (await this._isImportHashExistent(importHash)) {
556 throw new Error400(this.options.language, 'importer.errors.importHashExistent')
557 }
558
559 const dataToCreate = {
560 ...data,
561 importHash,
562 }
563
564 return this.create(dataToCreate)
565 }
566
567 async _isImportHashExistent(importHash) {
568 const count = await TenantRepository.count(

Callers

nothing calls this directly

Calls 2

_isImportHashExistentMethod · 0.95
createMethod · 0.95

Tested by

no test coverage detected