Remove unused

This commit is contained in:
Manav Rathi 2024-08-07 12:04:34 +05:30
parent fead530786
commit 9cc8469ed9
No known key found for this signature in database
2 changed files with 7 additions and 24 deletions

View File

@ -210,25 +210,6 @@ export async function changeFilesVisibility(
return await updateFileMagicMetadata(fileWithUpdatedMagicMetadataList);
}
export async function changeFileCreationTime(
file: EnteFile,
editedTime: number,
): Promise<EnteFile> {
const updatedPublicMagicMetadataProps: FilePublicMagicMetadataProps = {
editedTime,
};
const updatedPublicMagicMetadata: FilePublicMagicMetadata =
await updateMagicMetadata(
updatedPublicMagicMetadataProps,
file.pubMagicMetadata,
file.key,
);
const updateResult = await updateFilePublicMagicMetadata([
{ file, updatedPublicMagicMetadata },
]);
return updateResult[0];
}
export async function changeFileName(
file: EnteFile,
editedName: string,

View File

@ -220,12 +220,14 @@ const PublicMagicMetadata = z
.object({
// [Note: Zod doesn't work with `exactOptionalPropertyTypes` yet]
//
// Using `optional` is accurate here. The key is optional, but the value
// itself is not optional. Zod doesn't work with
// `exactOptionalPropertyTypes` yet, but it seems to be on the roadmap so we
// suppress these mismatches.
// Using `optional` is not accurate here. The key is optional, but the
// value itself is not optional.
//
// See: https://github.com/colinhacks/zod/issues/635#issuecomment-2196579063
// Zod doesn't work with `exactOptionalPropertyTypes` yet, but it seems
// to be on the roadmap so we suppress these mismatches.
//
// See:
// https://github.com/colinhacks/zod/issues/635#issuecomment-2196579063
editedTime: z.number().optional(),
})
.passthrough();