coyotte508's picture
coyotte508 HF staff
✨ Load pictures
fa79853
raw
history blame
384 Bytes
import type { PictureFs, Picture } from '$lib/types/Picture';
import type { Collection, Db } from 'mongodb';
export function createPictureCollections(db: Db): {
pictures: Collection<Picture>;
picturesFs: Collection<PictureFs>;
} {
const coll = db.collection<Picture>('pictures');
const fs = db.collection<PictureFs>('pictures.fs');
return { pictures: coll, picturesFs: fs };
}