Prefer using req instead of body

We'll deprecate body in the future
This commit is contained in:
Chocobozzz 2024-06-12 09:07:43 +02:00
parent 0adbc73eb9
commit 7ce6574989
No known key found for this signature in database
GPG Key ID: 583A612D890159BE

View File

@ -793,10 +793,10 @@ async function register ({
// Store data associated to this video
registerHook({
target: 'action:api.video.updated',
handler: ({ video, body }) => {
if (!body.pluginData) return
handler: ({ video, req }) => {
if (!req.body.pluginData) return
const value = body.pluginData[fieldName]
const value = req.body.pluginData[fieldName]
if (!value) return
storageManager.storeData(fieldName + '-' + video.id, value)