All files / src/api about.coffee

50% Statements 4/8
100% Branches 0/0
0% Functions 0/1
50% Lines 4/8
1 2 3 4 5 6 7 8 9 10 11 12 13 141x   1x 1x   1x                
currentCoreVersion = require('../../package.json').version
 
logger = require 'winston'
utils = require '../utils'
 
exports.getAboutInformation = () ->
  
  try
    this.body = yield { currentCoreVersion: currentCoreVersion, serverTimezone: utils.serverTimezone() }
    this.status = 200
    logger.info "User #{this.authenticated.email} successfully fetched 'about' information"
  catch e
    this.body = e.message
    utils.logAndSetResponse this, 500, "Could not fetch 'about' info via the API #{e}", 'error'