Upload All
This commit is contained in:
20
models/renderModels/index.js
Normal file
20
models/renderModels/index.js
Normal file
@ -0,0 +1,20 @@
|
||||
var PaintingSpotlight = require("../mongooseSchemas/PaintingSpotlight");
|
||||
/**
|
||||
* 取得首頁的插值資料。
|
||||
* @param {BasicLayout} renderData 插值物件。
|
||||
* @param {string} route 路由路徑。
|
||||
* @param {Express.Session} session Express的Session物件。
|
||||
* @param {CallbackFunction} callback 回呼函式。
|
||||
*/
|
||||
function IndexRender(renderData, route, session, callback) {
|
||||
PaintingSpotlight.GetCarouselInfo("index", function (err, infos) {
|
||||
if (err) {
|
||||
callback(err, null);
|
||||
}
|
||||
else {
|
||||
renderData.datas = infos;
|
||||
callback(null, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
module.exports.Render = IndexRender;
|
Reference in New Issue
Block a user