Пользователи: цвет при создании и редактировании
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const { normalizeStudentStatus } = require('./lib/students');
|
||||
const { normalizeUserColor } = require('./lib/users');
|
||||
const PHOTO_JOB_ACTIONS = new Set(['ai', 'ai_face', 'ai_upscale', 'enhance', 'restore', 'rollback']);
|
||||
const LESSON_REPORT_TEXT_MAX = 5000;
|
||||
const LESSON_REPORT_TOPIC_MAX = 300;
|
||||
@@ -369,6 +370,7 @@ function normalizeRestoreData(data) {
|
||||
password_hash: reqStr(x.password_hash, 255),
|
||||
name: optStr(x.name, 150),
|
||||
avatar: optUploadPath(x.avatar, 255),
|
||||
color: normalizeUserColor(x.color),
|
||||
role: (x.role === 'admin' || x.role === 'tutor') ? x.role : 'tutor',
|
||||
is_active: !!x.is_active,
|
||||
created_at: optTs(x.created_at),
|
||||
|
||||
Reference in New Issue
Block a user