mirror of
https://github.com/Troplo/Colubrina.git
synced 2024-11-25 12:46:42 +11:00
fix
This commit is contained in:
parent
663bdf8bee
commit
75df196dae
2 changed files with 37 additions and 1 deletions
|
@ -97,6 +97,18 @@ router.delete("/:id/:associationId", auth, async (req, res, next) => {
|
||||||
id: message.id
|
id: message.id
|
||||||
},
|
},
|
||||||
include: [
|
include: [
|
||||||
|
{
|
||||||
|
model: ChatAssociation,
|
||||||
|
as: "readReceipts",
|
||||||
|
attributes: ["id"],
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
model: User,
|
||||||
|
as: "user",
|
||||||
|
attributes: ["username", "name", "avatar", "id"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
model: Attachment,
|
model: Attachment,
|
||||||
as: "attachments"
|
as: "attachments"
|
||||||
|
@ -343,6 +355,18 @@ router.post("/:id", auth, async (req, res, next) => {
|
||||||
id: message.id
|
id: message.id
|
||||||
},
|
},
|
||||||
include: [
|
include: [
|
||||||
|
{
|
||||||
|
model: ChatAssociation,
|
||||||
|
as: "readReceipts",
|
||||||
|
attributes: ["id"],
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
model: User,
|
||||||
|
as: "user",
|
||||||
|
attributes: ["username", "name", "avatar", "id"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
model: Attachment,
|
model: Attachment,
|
||||||
as: "attachments"
|
as: "attachments"
|
||||||
|
@ -465,6 +489,18 @@ router.delete("/:id", auth, async (req, res, next) => {
|
||||||
id: message.id
|
id: message.id
|
||||||
},
|
},
|
||||||
include: [
|
include: [
|
||||||
|
{
|
||||||
|
model: ChatAssociation,
|
||||||
|
as: "readReceipts",
|
||||||
|
attributes: ["id"],
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
model: User,
|
||||||
|
as: "user",
|
||||||
|
attributes: ["username", "name", "avatar", "id"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
model: Attachment,
|
model: Attachment,
|
||||||
as: "attachments"
|
as: "attachments"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "colubrina-chat",
|
"name": "colubrina",
|
||||||
"version": "1.0.11",
|
"version": "1.0.11",
|
||||||
"private": true,
|
"private": true,
|
||||||
"author": "Troplo <troplo@troplo.com>",
|
"author": "Troplo <troplo@troplo.com>",
|
||||||
|
|
Loading…
Reference in a new issue