feat: rename enum instead of string

This commit is contained in:
Mohamed Marrouchi
2025-01-16 10:14:50 +01:00
parent 3f9dd692bf
commit c27f37a6e6
18 changed files with 116 additions and 70 deletions

View File

@@ -12,6 +12,7 @@ import mime from 'mime';
import { v4 as uuidv4 } from 'uuid';
import { AttachmentService } from '@/attachment/services/attachment.service';
import { AttachmentResourceRef } from '@/attachment/types';
import EventWrapper from '@/channel/lib/EventWrapper';
import { config } from '@/config';
import { HelperService } from '@/helper/helper.service';
@@ -280,7 +281,7 @@ export class ChatService {
name: `avatar-${uuidv4()}.${extension}`,
size,
type,
resourceRef: 'subscriber_avatar',
resourceRef: AttachmentResourceRef.SubscriberAvatar,
access: 'private',
createdByRef: 'Subscriber',
createdBy: subscriber.id,