overleaf/services
Antoine Clausse aa7839876a [web] Promisify MetricsEmailController and InstitutionHubsController (attempt 2) (#18805)
* Reapply "[web] Promisify MetricsEmailController and InstitutionHubsController …"

This reverts commit ea14df1395f1dc2fa7d41fc7837849f9686425b5.

* Fix changes to node-fetch: `statusCode` -> `status` (!!)

* Update test

* Handle no-content without throwing (!)

Avoid error `Unexpected end of JSON input` when doing `response.json()` on an empty response when status is 204

Related: https://github.com/node-fetch/node-fetch/issues/165

* Also return `204` when no data in departments_data and roles_data

* Revert "Handle no-content without throwing (!)", and return null instead

This reverts commits 3baa779f7a9e64804e54a276faf865ab9252f336 and 51507a3d763d7006c8b01414a7c79bd3f3b6948b.

* Update tests: `assert_nil`

* Fixup: Update tests: assert null

* Use `fetchJSON` in Institution.fetchV1Data

* Proxy errors from server without throwing 500

GitOrigin-RevId: 9c13e293f3fed3abd2accddd1a9060ed02b96ba2
2024-06-19 08:04:02 +00:00
..
chat Explicitly specify latest version of async 2024-06-17 08:04:00 +00:00
clsi Explicitly specify latest version of async 2024-06-17 08:04:00 +00:00
contacts Explicitly specify latest version of async 2024-06-17 08:04:00 +00:00
docstore Explicitly specify latest version of async 2024-06-17 08:04:00 +00:00
document-updater Sets lastUpdatedBy to null when it is empty on github sync update (#18788) 2024-06-18 08:04:39 +00:00
filestore Merge pull request #18289 from overleaf/ac-ar-eslint-return-await 2024-05-27 10:22:49 +00:00
git-bridge Merge pull request #18402 from overleaf/msm-git-bridge-pom 2024-06-17 08:04:21 +00:00
history-v1 Merge pull request #18088 from overleaf/ab-session-secret-rotation 2024-05-27 10:23:33 +00:00
notifications Explicitly specify latest version of async 2024-06-17 08:04:00 +00:00
project-history [web] show file restored change in history (#18792) 2024-06-18 08:04:43 +00:00
real-time Explicitly specify latest version of async 2024-06-17 08:04:00 +00:00
spelling Explicitly specify latest version of async 2024-06-17 08:04:00 +00:00
web [web] Promisify MetricsEmailController and InstitutionHubsController (attempt 2) (#18805) 2024-06-19 08:04:02 +00:00