 import moment from 'moment'
 
 API.add 'service/oab/deposit',
-  get: 
-    authOptional: true
-    action: () -> 
+  get:
+    authOptional: true
+    action: () ->
       return API.service.oab.deposit undefined, this.queryParams, API.http.getFiles(this.queryParams.url), this.userId
-  post: 
-    authOptional: true
-    action: () -> 
+  post:
+    authOptional: true
+    action: () ->
       return API.service.oab.deposit undefined, this.bodyParams, this.request.files, this.userId
 
 API.add 'service/oab/deposit/:did',
-  get: 
-    authOptional: true
-    action: () -> 
+  get:
+    authOptional: true
+    action: () ->
       return API.service.oab.deposit this.urlParams.did, this.queryParams
-  post: 
-    authOptional: true
-    action: () -> 
+  post:
+    authOptional: true
+    action: () ->
       return API.service.oab.deposit this.urlParams.did, this.bodyParams, this.request.files
 
 API.add 'service/oab/deposits',

  text += 'This email notifies the institution that the depositor wishes to deposit their article with the institutional repository, but we do not yet have the article - the institution should contact the depositor directly.\n\n' if dep.typ is 'dark'
  text += 'We have deposited this in Zenodo.\n\n' if dep.type is 'zenodo'
  text += 'We have deposited this in Zenodo under embargo until ' + perms.embargo + '\n\n' if dep.type is 'embargoed'
  text += 'Author email to contact: \n' + options.email + '\n\n' if options.email 
  text += 'The depositor has confirmed that this file is the correct item to deposit.\n\n' if options.confirmed? and options.confirmed isnt perms.file?.checksum
  text += 'The administrator has confirmed that this file is the correct item to deposit.\n\n' if options.confirmed? and options.confirmed is perms.file?.checksum
  text += 'There is already an open URL for this article at \n' + options.redeposit + '\n\n' if typeof options.redeposit is 'string'

    description = description.trim()
    description += '.' if description.lastIndexOf('.') isnt description.length-1
    description += ' ' if description.length
    description += '<br><br>Deposited by shareyourpaper.org and openaccessbutton.org. We\'ve taken reasonable steps to ensure this content doesn\'t violate copyright, however, if you think it does you can request a takedown by emailing help@openaccessbutton.org.'
    meta =
      title: d.metadata.title ? 'Unknown',
      description: description.trim(),
