|
1 | 1 | import { usecases } from '../../domain/usecases/index.js';
|
2 | 2 |
|
3 | 3 | /**
|
4 |
| - * Accept legal document by user id. |
| 4 | + * Accepts a legal document for a user by their ID. |
5 | 5 | *
|
6 |
| - * @param{string} params.service |
7 |
| - * @param{string} params.type |
8 |
| - * @param{string} params.userId |
9 |
| - * |
10 |
| - * @returns {Promise<void>} |
| 6 | + * @param {Object} params - The parameters. |
| 7 | + * @param {string} params.type - The type of the legal document. (e.g. 'TOS') |
| 8 | + * @param {string} params.service - The service associated with the legal document. (e.g. 'pix-orga') |
| 9 | + * @param {string} params.userId - The ID of the user. |
| 10 | + * @returns {Promise<void>} - A promise that resolves when the legal document is accepted. |
11 | 11 | */
|
12 | 12 | const acceptLegalDocumentByUserId = async ({ type, service, userId }) => {
|
13 | 13 | return usecases.acceptLegalDocumentByUserId({ type, service, userId });
|
14 | 14 | };
|
15 | 15 |
|
16 |
| -export { acceptLegalDocumentByUserId }; |
| 16 | +/** |
| 17 | + * Gets the status of a legal document for a user by their ID. |
| 18 | + * |
| 19 | + * @param {Object} params - The parameters. |
| 20 | + * @param {string} params.type - The type of the legal document. (e.g. 'TOS') |
| 21 | + * @param {string} params.service - The service associated with the legal document. (e.g. 'pix-orga') |
| 22 | + * @param {string} params.userId - The ID of the user. |
| 23 | + * @returns {Promise<LegalDocumentStatus>} - A promise that resolves with the status of the legal document. |
| 24 | + */ |
| 25 | +const getLegalDocumentStatusByUserId = async ({ type, service, userId }) => { |
| 26 | + return usecases.getLegalDocumentStatusByUserId({ type, service, userId }); |
| 27 | +}; |
| 28 | + |
| 29 | +export { acceptLegalDocumentByUserId, getLegalDocumentStatusByUserId }; |
0 commit comments