Ver Fonte

clean code

Yuki Takei há 7 anos atrás
pai
commit
f7d62528bc
1 ficheiros alterados com 0 adições e 17 exclusões
  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;
     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) {
   attachmentSchema.statics.getListByPageId = function(id) {
     var self = this;
     var self = this;