2015-09-17 14:51:14 +09:00
|
|
|
FlowRouter.addToQueryArray = function (key, value) {
|
|
|
|
var keyArray = FlowRouter.getQueryParam(key) || [];
|
|
|
|
keyArray.push(value);
|
|
|
|
var params = {};
|
|
|
|
params[key] = keyArray;
|
|
|
|
FlowRouter.setQueryParams(params);
|
|
|
|
}
|
|
|
|
|
|
|
|
FlowRouter.removeFromQueryArray = function (key, value) {
|
|
|
|
var keyArray = FlowRouter.getQueryParam(key);
|
|
|
|
keyArray = _.without(keyArray, value);
|
|
|
|
var params = {};
|
|
|
|
params[key] = keyArray;
|
|
|
|
FlowRouter.setQueryParams(params);
|
2015-09-19 10:33:37 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
Telescope.adminRoutes = FlowRouter.group({
|
|
|
|
prefix: '/admin',
|
|
|
|
name: 'admin'
|
|
|
|
});
|
|
|
|
|
|
|
|
FlowRouter.notFound = {
|
|
|
|
action: function() {
|
2015-10-21 12:40:01 +09:00
|
|
|
if (Meteor.isClient) {
|
|
|
|
DocHead.addMeta({
|
|
|
|
name: "name",
|
|
|
|
property: "prerender-status-code",
|
|
|
|
content: "404"
|
|
|
|
});
|
|
|
|
DocHead.addMeta({
|
|
|
|
name: "name",
|
|
|
|
property: "robots",
|
|
|
|
content: "noindex, nofollow"
|
|
|
|
});
|
|
|
|
}
|
2015-09-19 10:33:37 +09:00
|
|
|
BlazeLayout.render("layout", {main: "not_found"});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2015-10-20 11:55:22 +09:00
|
|
|
FlowRouter.triggers.enter([function () {Events.analyticsRequest()}]);
|
|
|
|
|
2015-10-21 12:40:01 +09:00
|
|
|
FlowRouter.triggers.exit([function () {Messages.clearSeen()}]);
|