Add ability to set custom field to video form
This commit is contained in:
parent
f95628636b
commit
7294aab0c8
30 changed files with 249 additions and 76 deletions
|
@ -414,7 +414,7 @@ async function updateVideo (req: express.Request, res: express.Response) {
|
|||
Notifier.Instance.notifyOnNewVideoIfNeeded(videoInstanceUpdated)
|
||||
}
|
||||
|
||||
Hooks.runAction('action:api.video.updated', { video: videoInstanceUpdated })
|
||||
Hooks.runAction('action:api.video.updated', { video: videoInstanceUpdated, body: req.body })
|
||||
} catch (err) {
|
||||
// Force fields we want to update
|
||||
// If the transaction is retried, sequelize will think the object has not changed
|
||||
|
|
|
@ -78,7 +78,10 @@ function videoModelToFormattedJSON (video: MVideoFormattable, options?: VideoFor
|
|||
|
||||
userHistory: userHistory ? {
|
||||
currentTime: userHistory.currentTime
|
||||
} : undefined
|
||||
} : undefined,
|
||||
|
||||
// Can be added by external plugins
|
||||
pluginData: (video as any).pluginData
|
||||
}
|
||||
|
||||
if (options) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue