Commit add2d2b3 authored by Yoon, Daeki's avatar Yoon, Daeki 😅
Browse files

fileinfo model 옵션 변경

parent 6c265dde
...@@ -38,20 +38,19 @@ export const createMainimg = asyncWrap(async (reqExp, res) => { ...@@ -38,20 +38,19 @@ export const createMainimg = asyncWrap(async (reqExp, res) => {
{ {
originalfilename, originalfilename,
newfilename, newfilename,
picturepath: files.mainimg.filepath,
} }
); );
console.log(imgRes) console.log(imgRes);
return res.json(imgRes); return res.json(imgRes);
} else {
}else{ return res.send("에러");
return res.send("에러")
} }
} }
} }
}); });
}); });
export const getMainimg = asyncWrap(async (req, res) => { export const getMainimg = asyncWrap(async (req, res) => {
const mainimgs = await mainimgDb.getMainimg(); const mainimgs = await mainimgDb.getMainimg();
return res.json(mainimgs); return res.json(mainimgs);
......
import { model, ObjectId, Schema } from "mongoose"; import { model, ObjectId, Schema } from "mongoose";
export interface IFileInfo { export interface IFileInfo {
originalfilename?: string; originalfilename: string;
newfilename?: string; newfilename: string;
picturepath?: string; picturepath: string;
nickname?: string; nickname?: string;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment