-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: some adjustments regarding to reviews
- Loading branch information
1 parent
399dd5b
commit a916132
Showing
23 changed files
with
96 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { ContactDTO } from '../useCases/ContactDTO' | ||
import { FeedbackDTO } from '../useCases/FeedbackDTO' | ||
import { Contact } from '../models/Contact' | ||
|
||
export interface ContactRepository { | ||
submitContactInfo: (contactDTO: ContactDTO) => Promise<Contact[]> | ||
sendFeedbacktoOwners: (feedbackDTO: FeedbackDTO) => Promise<Contact[]> | ||
} |
2 changes: 1 addition & 1 deletion
2
src/contact/domain/useCases/ContactDTO.ts → src/contact/domain/useCases/FeedbackDTO.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/contact/domain/useCases/submitContact.ts → ...t/domain/useCases/sendFeedbacktoOwners.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import { ContactRepository } from '../repositories/ContactRepository' | ||
import { WriteError } from '@iqss/dataverse-client-javascript' | ||
import { ContactDTO } from './ContactDTO' | ||
import { FeedbackDTO } from '../useCases/FeedbackDTO' | ||
import { Contact } from '../models/Contact' | ||
|
||
export async function submitContact( | ||
export async function sendFeedbacktoOwners( | ||
ContactRepository: ContactRepository, | ||
contactDTO: ContactDTO | ||
FeedbackDTO: FeedbackDTO | ||
): Promise<Contact[]> { | ||
return ContactRepository.submitContactInfo(contactDTO).catch((error: WriteError) => { | ||
return ContactRepository.sendFeedbacktoOwners(FeedbackDTO).catch((error: WriteError) => { | ||
throw new Error(error.message) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { submitContactInfo } from '@iqss/dataverse-client-javascript' | ||
import { Contact } from '../domain/models/Contact' | ||
import { ContactRepository } from '../domain/repositories/ContactRepository' | ||
import { ContactDTO } from '../domain/useCases/ContactDTO' | ||
import { submitContactInfo } from '@iqss/dataverse-client-javascript' | ||
import { FeedbackDTO } from '../domain/useCases/FeedbackDTO' | ||
|
||
export class ContactJSDataverseRepository implements ContactRepository { | ||
async submitContactInfo(contactDTO: ContactDTO): Promise<Contact[]> { | ||
return submitContactInfo.execute(contactDTO).then((response: Contact[]) => response) | ||
async sendFeedbacktoOwners(feedbackDTO: FeedbackDTO): Promise<Contact[]> { | ||
return submitContactInfo.execute(feedbackDTO).then((response: Contact[]) => response) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.