mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
fix(AP): return a 201 on Create/Update/Delete
This commit is contained in:
parent
134c15f628
commit
4868c0af58
3 changed files with 5 additions and 3 deletions
|
@ -73,7 +73,7 @@ module.exports = {
|
||||||
await event.setTags(tags)
|
await event.setTags(tags)
|
||||||
}
|
}
|
||||||
|
|
||||||
return event
|
return res.sendStatus(201)
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ module.exports = {
|
||||||
await event.setTags(tags)
|
await event.setTags(tags)
|
||||||
}
|
}
|
||||||
|
|
||||||
return event
|
return res.sendStatus(201)
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,7 @@ module.exports = async (req, res) => {
|
||||||
} else {
|
} else {
|
||||||
// await Resources.create(req, res)
|
// await Resources.create(req, res)
|
||||||
log.warn(`[FEDI] Create with unsupported Object or not a reply => ${message.object.type}`)
|
log.warn(`[FEDI] Create with unsupported Object or not a reply => ${message.object.type}`)
|
||||||
|
return res.sendStatus(404)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -13,7 +13,8 @@ module.exports = {
|
||||||
|
|
||||||
if (!events.length) { return }
|
if (!events.length) { return }
|
||||||
|
|
||||||
log.info(`Remove ${events.length} past federated events`)
|
log.info(`Remove ${events.length} past federated events and related resources`)
|
||||||
|
await Resource.destroy({ where: { eventId: events.map(e => e.id) }})
|
||||||
|
|
||||||
await Event.destroy({
|
await Event.destroy({
|
||||||
where: {
|
where: {
|
||||||
|
|
Loading…
Reference in a new issue