From c6ce50d0a8bbb308b48dc193e61d98877346695b Mon Sep 17 00:00:00 2001 From: juan ignacio Date: Tue, 19 Sep 2023 13:16:44 -0300 Subject: [PATCH 1/2] add username property --- src/commands/tarea/uploadTarea.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/commands/tarea/uploadTarea.ts b/src/commands/tarea/uploadTarea.ts index 4543290..2702d8e 100644 --- a/src/commands/tarea/uploadTarea.ts +++ b/src/commands/tarea/uploadTarea.ts @@ -44,6 +44,7 @@ export const uploadTarea = async ({ if (!users.length) { const createUserDto: ICreateUserDto = { + username: email, externalId: auth0Id, roles: ['Student'], }; From d6db406994a09991f603aecbddaf254a8bad39ee Mon Sep 17 00:00:00 2001 From: juan ignacio Date: Tue, 19 Sep 2023 14:57:08 -0300 Subject: [PATCH 2/2] add username to user creation test --- src/commands/__test__/uploadTarea.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/__test__/uploadTarea.test.ts b/src/commands/__test__/uploadTarea.test.ts index 126a3c4..9fcd8ad 100644 --- a/src/commands/__test__/uploadTarea.test.ts +++ b/src/commands/__test__/uploadTarea.test.ts @@ -165,7 +165,7 @@ describe('uploadTarea test', () => { const expectedUser: ICreateUserDto = { roles: ['Student'], - username: undefined, + username: 'fake@email.com', externalId: `oauth2|sign-in-with-slack|${MOCKED_SLACK_TEAM_ID}-mockId`, };