Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
fix(transformer): default attachedChatFile
Browse files Browse the repository at this point in the history
Co-authored-by: Kenneth Trecy Tobias <19201.tobias.kennethtrecy.c@gmail.com>
  • Loading branch information
lemredd and KennethTrecy committed Oct 10, 2022
1 parent 612b01d commit f268570
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions database/transformers/chat_message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ import ChatMessage from "%/models/chat_message"
import UserTransformer from "%/transformers/user"
import Serializer from "%/transformers/serializer"
import ConsultationTransformer from "%/transformers/consultation"
import ChatMessageActivityTransformer from "%/transformers/chat_message_activity"
import AttachedChatFileTransformer from "%/transformers/attached_chat_file"
import ChatMessageActivityTransformer from "%/transformers/chat_message_activity"

type Relationships = "user"|"consultation"|"chatMessageActivity"|"attachedChatFile"

export default class extends Transformer<ChatMessage, void> {
constructor({ included }: IncludedRelationships<Relationships> = { "included": [ "user" ] }) {
constructor({ included }: IncludedRelationships<Relationships> = {
"included": [ "user", "attachedChatFile" ]
}) {
super("chat_message", [
included.indexOf("user") > -1
? {
Expand Down

0 comments on commit f268570

Please sign in to comment.