mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
19 lines
302 B
CoffeeScript
19 lines
302 B
CoffeeScript
|
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
|
||
|
}
|