mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 04:41:32 +02:00
Move util/promises from web into a shared library GitOrigin-RevId: fe1980dc57b9dc8ce86fa1fad6a8a817e9505b3d
19 lines
384 B
JavaScript
19 lines
384 B
JavaScript
const UserGetter = require('./UserGetter')
|
|
const { callbackify } = require('@overleaf/promise-utils')
|
|
|
|
async function getPersonalInfo(userId) {
|
|
return UserGetter.promises.getUser(userId, {
|
|
_id: true,
|
|
first_name: true,
|
|
last_name: true,
|
|
email: true,
|
|
})
|
|
}
|
|
|
|
module.exports = {
|
|
getPersonalInfo: callbackify(getPersonalInfo),
|
|
promises: {
|
|
getPersonalInfo,
|
|
},
|
|
}
|