feat(automations): ctx.tasks.sendMessage — сообщение в чат задачи от Системы; userId в triggerData status_changed
This commit is contained in:
@@ -414,7 +414,9 @@ export function registerUserManagementRoutes(router: Router): void {
|
||||
appRole: z.string().min(1, 'Выберите роль доступа'),
|
||||
organizationalRoleIds: z.array(z.number()).optional(),
|
||||
sendInvite: z.boolean().default(true),
|
||||
statusId: z.union([z.number(), z.null()]).optional()
|
||||
statusId: z.union([z.number(), z.null()]).optional(),
|
||||
// Необязательный явный пароль; состав дополнительно проверяет hashPassword (400 с текстом правила)
|
||||
password: z.string().min(8, 'Пароль должен содержать минимум 8 символов').optional()
|
||||
})),
|
||||
async (req: AuthenticatedRequest, res) => {
|
||||
try {
|
||||
@@ -427,7 +429,8 @@ export function registerUserManagementRoutes(router: Router): void {
|
||||
appRole: req.body.appRole,
|
||||
organizationalRoleIds: req.body.organizationalRoleIds,
|
||||
sendInvite: req.body.sendInvite,
|
||||
statusId: req.body.statusId ?? undefined
|
||||
statusId: req.body.statusId ?? undefined,
|
||||
password: req.body.password
|
||||
});
|
||||
|
||||
if (result.success && result.user) {
|
||||
|
||||
Reference in New Issue
Block a user