mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-26 18:20:47 +00:00
14 lines
No EOL
404 B
CoffeeScript
14 lines
No EOL
404 B
CoffeeScript
async = require "async"
|
|
|
|
module.exports = Utils =
|
|
getClientAttributes: (client, keys, callback = (error, attributes) ->) ->
|
|
attributes = {}
|
|
jobs = keys.map (key) ->
|
|
(callback) ->
|
|
client.get key, (error, value) ->
|
|
return callback(error) if error?
|
|
attributes[key] = value
|
|
callback()
|
|
async.series jobs, (error) ->
|
|
return callback(error) if error?
|
|
callback null, attributes |