Shun Miyazawa %!s(int64=4) %!d(string=hai) anos
pai
achega
8d7ac597f3
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      packages/app/src/interfaces/activity.ts

+ 2 - 2
packages/app/src/interfaces/activity.ts

@@ -66,7 +66,7 @@ export type SupportedTargetModelType = typeof SUPPORTED_TARGET_MODEL_TYPE[keyof
 export type SupportedActionType = typeof SUPPORTED_ACTION_TYPE[keyof typeof SUPPORTED_ACTION_TYPE];
 
 
-export type ISnapshot =  Pick<IUser, 'username'>
+export type ISnapshot =  Partial<Pick<IUser, 'username'>>
 
 export type IActivity = {
   user?: IUser
@@ -74,7 +74,7 @@ export type IActivity = {
   target: string
   action: SupportedActionType
   createdAt: Date
-  snapshot: ISnapshot
+  snapshot?: ISnapshot
 }
 
 export type IActivityHasId = IActivity & HasObjectId;