UNPKG

payload

Version:

Node, React, Headless CMS and Application Framework built on Next.js

17 lines (16 loc) 397 B
export const docWithFilenameExists = async ({ collectionSlug, filename, req })=>{ const doc = await req.payload.db.findOne({ collection: collectionSlug, req, where: { filename: { equals: filename } } }); if (doc) { return true; } return false; }; //# sourceMappingURL=docWithFilenameExists.js.map