import { Mainimg, MainimgType } from "../models"; export const createMainimg = async (mainimg: MainimgType) => { const newMainimg = await Mainimg.create({ theme: mainimg.theme, city: mainimg.city, url: mainimg.url, title: mainimg.title, }); return newMainimg; }; export const getMainimg = async () => { const users = await Mainimg.find({}); return users; };