|
|
@@ -68,5 +68,12 @@ module.exports = function(crowi) {
|
|
|
};
|
|
|
|
|
|
|
|
|
+ attachmentSchema.methods.isExpiredExternalUrl = function() {
|
|
|
+ if (this.externalUrlExpiredAt == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return this.externalUrlExpiredAt.getTime() < new Date().getTime();
|
|
|
+ };
|
|
|
+
|
|
|
return mongoose.model('Attachment', attachmentSchema);
|
|
|
};
|