Details
Details
N/A
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
lib/facts/backup-service.js | ||
---|---|---|
3–6 ↗ | (On Diff #30468) | Requesting changes to address https://phab.comm.dev/D8991#inline-57473 Might be also worth doing for Blob service facts: // lib/facts/blob-service.js type BlobServicePath = '/blob/:blobHash' | '/blob'; export type BlobServiceHTTPEndpoint = { +path: BlobServicePath, +method: 'GET' | 'POST' | 'PUT' | 'DELETE', }; |
lib/facts/backup-service.js | ||
---|---|---|
14–30 ↗ | (On Diff #30468) | I would probably name them like this |
lib/facts/backup-service.js | ||
---|---|---|
15–19 ↗ | (On Diff #30468) | Also we can probably use JS style naming convention (blob facts also use camelCase) (remember to also change all calls to makeBackupServiceEndpointURL with the different names!) |
Comment Actions
This is a larger change that we probably don't need to implement but what about creating something more like this:
const httpEndpoints = Object.freeze({ UPLOAD_BACKUP: () => { path: '/backups', method: 'POST', }, GET_USER_KEYS_AUTH: (backup_id) => { path: `/backups/${backup_id}/user_keys`, method: 'GET', },
Maybe even add an argument for auth identity, and make the returned objects contain headers?: string[], that would be added with spread operator to the other headers?