overleaf/services/web/app/coffee/infrastructure/LoggerSerializers.coffee

19 lines
302 B
CoffeeScript
Raw Normal View History

2014-02-12 05:23:40 -05:00
module.exports =
user: (user) ->
if !user._id?
user = {_id : user}
return {
id: user._id
email: user.email
first_name: user.name
last_name: user.name
}
project: (project) ->
if !project._id?
project = {_id: project}
return {
id: project._id
name: project.name
}