groups: AI enhance for gallery photos (photo_jobs.group_photo_id, before/after compare modal)
This commit is contained in:
+3
-1
@@ -384,6 +384,7 @@ function normalizeRestoreData(data) {
|
||||
id: reqInt(x.id),
|
||||
group_id: reqInt(x.group_id),
|
||||
photo_path: reqUploadPath(x.photo_path, 255),
|
||||
photo_original_path: optUploadPath(x.photo_original_path, 255),
|
||||
caption: optStr(x.caption, 10000),
|
||||
taken_at: optDate(x.taken_at),
|
||||
sort_order: optInt(x.sort_order, -2147483648, 2147483647),
|
||||
@@ -471,7 +472,8 @@ function normalizeRestoreData(data) {
|
||||
const PHOTO_JOB_STATUSES = new Set(['pending', 'processing', 'done', 'error', 'rejected']);
|
||||
const photo_jobs = (data.photo_jobs || []).map(x => ({
|
||||
id: reqInt(x.id),
|
||||
entry_id: reqInt(x.entry_id),
|
||||
entry_id: optInt(x.entry_id, 1, 2147483647),
|
||||
group_photo_id: optInt(x.group_photo_id, 1, 2147483647),
|
||||
action: (x.action && PHOTO_JOB_ACTIONS.has(x.action)) ? x.action : 'ai',
|
||||
params: optJsonText(x.params, 20000),
|
||||
before_path: optPhotoRefPath(x.before_path, 255),
|
||||
|
||||
Reference in New Issue
Block a user