|
@@ -424,6 +424,9 @@ module.exports = function(crowi) {
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * とりあえず、公開ページであり、redirectTo が無いものだけを出すためだけのAPI
|
|
|
|
|
+ */
|
|
|
pageSchema.statics.findListByCreator = function(user, option) {
|
|
pageSchema.statics.findListByCreator = function(user, option) {
|
|
|
var Page = this;
|
|
var Page = this;
|
|
|
var User = crowi.model('User');
|
|
var User = crowi.model('User');
|
|
@@ -432,7 +435,7 @@ module.exports = function(crowi) {
|
|
|
|
|
|
|
|
return new Promise(function(resolve, reject) {
|
|
return new Promise(function(resolve, reject) {
|
|
|
Page
|
|
Page
|
|
|
- .find({ creator: user._id, grant: GRANT_PUBLIC })
|
|
|
|
|
|
|
+ .find({ creator: user._id, grant: GRANT_PUBLIC, redirectTo: null })
|
|
|
.sort({createdAt: -1})
|
|
.sort({createdAt: -1})
|
|
|
.skip(offset)
|
|
.skip(offset)
|
|
|
.limit(limit)
|
|
.limit(limit)
|