TpdsQueueManager.mjs 431 B

12345678910111213141516171819
  1. import Settings from '@overleaf/settings'
  2. import OError from '@overleaf/o-error'
  3. import { fetchJson } from '@overleaf/fetch-utils'
  4. async function getQueues(userId) {
  5. try {
  6. return await fetchJson(
  7. `${Settings.apis.thirdPartyDataStore.url}/queues/${userId}`
  8. )
  9. } catch (err) {
  10. throw OError.tag(err, 'failed to query TPDS queues for user', { userId })
  11. }
  12. }
  13. export default {
  14. promises: {
  15. getQueues,
  16. },
  17. }