Skip to content

Commit aa4b2b1

Browse files
authored
chore: update user (#50)
1 parent 6e19863 commit aa4b2b1

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

apps/event-system/services/users/users.service.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,25 @@ module.exports = {
200200
values: ['completed-onboarding'],
201201
optional: true,
202202
},
203+
role: {
204+
type: 'string',
205+
optional: true,
206+
},
207+
companyWebsite: {
208+
type: 'string',
209+
optional: true,
210+
},
211+
companySize: {
212+
type: 'string',
213+
optional: true,
214+
},
215+
buildingAI: {
216+
type: 'boolean',
217+
optional: true,
218+
},
203219
},
204220
async handler(ctx: any) {
205-
const { firstName, lastName, avatar, state, ...rest } = ctx.params;
221+
const { firstName, lastName, avatar, state, role, companyWebsite, companySize, buildingAI, ...rest } = ctx.params;
206222

207223
try {
208224
const user = await ctx.broker.call(
@@ -227,6 +243,10 @@ module.exports = {
227243
...(firstName ? { firstName } : {}),
228244
...(lastName ? { lastName } : {}),
229245
...(avatar ? { avatar } : {}),
246+
...(role ? { role } : {}),
247+
...(companyWebsite ? { companyWebsite } : {}),
248+
...(companySize ? { companySize } : {}),
249+
...(buildingAI ? { buildingAI } : {}),
230250
},
231251
...(state ? { state } : {}),
232252
...(state

0 commit comments

Comments
 (0)