Browse Source

add comments

Yuki Takei 8 years ago
parent
commit
df13793bb3
1 changed files with 6 additions and 0 deletions
  1. 6 0
      lib/models/page.js

+ 6 - 0
lib/models/page.js

@@ -611,6 +611,9 @@ module.exports = function(crowi) {
 
 
   /**
   /**
    * find the page that is match with `path` and its descendants
    * find the page that is match with `path` and its descendants
+   *
+   * 1. `/` will be added to the end of `path`
+   * 2. the regex strings included in `path` will be escaped
    */
    */
   pageSchema.statics.findListWithDescendants = function(path, userData, option) {
   pageSchema.statics.findListWithDescendants = function(path, userData, option) {
     var Page = this;
     var Page = this;
@@ -672,6 +675,9 @@ module.exports = function(crowi) {
 
 
   /**
   /**
    * generate the query to find the page that is match with `path` and its descendants
    * generate the query to find the page that is match with `path` and its descendants
+   *
+   * 1. `/` will be added to the end of `path`
+   * 2. the regex strings included in `path` will be escaped
    */
    */
   pageSchema.statics.generateQueryToListWithDescendants = function(path, userData, option) {
   pageSchema.statics.generateQueryToListWithDescendants = function(path, userData, option) {
     var Page = this;
     var Page = this;