Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/collections/operations/local/update.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Config as GeneratedTypes } from 'payload/generated-types';
import { MarkOptional } from 'ts-essentials';
import { Payload } from '../../../payload';
import { Document } from '../../../types';
import getFileByPath from '../../../uploads/getFileByPath';
Expand All @@ -13,7 +12,7 @@ import { APIError } from '../../../errors';
export type Options<TSlug extends keyof GeneratedTypes['collections']> = {
collection: TSlug
id: string | number
data: MarkOptional<GeneratedTypes['collections'][TSlug], 'id' | 'updatedAt' | 'createdAt'>
data: Partial<GeneratedTypes['collections'][TSlug]>
depth?: number
locale?: string
fallbackLocale?: string
Expand Down
3 changes: 1 addition & 2 deletions src/collections/operations/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { promisify } from 'util';

import httpStatus from 'http-status';
import { Config as GeneratedTypes } from 'payload/generated-types';
import { MarkOptional } from 'ts-essentials';
import { Where, Document } from '../../types';
import { Collection } from '../config/types';
import sanitizeInternalFields from '../../utilities/sanitizeInternalFields';
Expand All @@ -27,7 +26,7 @@ export type Arguments<T extends { [field: string | number | symbol]: unknown }>
collection: Collection
req: PayloadRequest
id: string | number
data: MarkOptional<T, 'id' | 'createdAt' | 'updatedAt'>
data: Partial<T>
depth?: number
disableVerificationEmail?: boolean
overrideAccess?: boolean
Expand Down