Files
JMuseum/models/renderModels/theme.js
2018-02-26 14:09:18 +08:00

22 lines
803 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var Season = require("../mongooseSchemas/Season");
/**
* 頁面「畫作主題」的插值函式。
* @param {BasicLayout} renderData 基本插值物件。
* @param {string} route 路由路徑。
* @param {Express.Session} session Express的Session物件。
* @param {CallbackFunction} callback 回呼函式。
*/
function ThemeRender(renderData, route, session, callback) {
// 先取得「畫作主題」頁面所需要的季資訊
// 若出現錯誤則回呼錯誤訊息若取得成功則回呼true已表示成功。
Season.GetThemePageNeedInfo(function (err, seasonDatas) {
if (err) {
callback(err, null);
return;
}
renderData.datas = seasonDatas;
callback(null, true);
});
}
module.exports.Render = ThemeRender;