Yuki Takei 7 лет назад
Родитель
Сommit
f7d62528bc
1 измененных файлов с 0 добавлено и 17 удалено
  1. 0 17
      src/server/models/attachment.js

+ 0 - 17
src/server/models/attachment.js

@@ -46,23 +46,6 @@ module.exports = function(crowi) {
     return filePath;
   });
 
-  attachmentSchema.statics.findById = function(id) {
-    var Attachment = this;
-
-    return new Promise(function(resolve, reject) {
-      Attachment.findOne({_id: id}, function(err, data) {
-        if (err) {
-          return reject(err);
-        }
-
-        if (data === null) {
-          return reject(new Error('Attachment not found'));
-        }
-        return resolve(data);
-      });
-    });
-  };
-
   attachmentSchema.statics.getListByPageId = function(id) {
     var self = this;