mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 04:50:49 +00:00
Merge pull request #17108 from overleaf/jpa-tpds-remove-sl-prefix-1
[misc] remove ShareLaTeX branding from tpds job headers 1/2 GitOrigin-RevId: c4b028f037be6d4a312d8c62ea7ec603ec192bb0
This commit is contained in:
parent
5889aa1c1b
commit
8c339045b3
1 changed files with 14 additions and 0 deletions
|
@ -56,6 +56,11 @@ async function addEntity(params) {
|
|||
sl_entity_rev: rev,
|
||||
sl_project_id: projectId,
|
||||
sl_folder_id: folderId,
|
||||
'x-entity-id': entityId,
|
||||
'x-entity-rev': rev,
|
||||
'x-entity-type': entityType,
|
||||
'x-folder-id': folderId,
|
||||
'x-project-id': projectId,
|
||||
},
|
||||
uri: buildTpdsUrl(userId, projectName, path),
|
||||
title: 'addFile',
|
||||
|
@ -124,6 +129,9 @@ async function deleteEntity(params) {
|
|||
sl_project_id: projectId,
|
||||
sl_entity_id: entityId,
|
||||
sl_entity_type: entityType,
|
||||
'x-entity-id': entityId,
|
||||
'x-entity-type': entityType,
|
||||
'x-project-id': projectId,
|
||||
},
|
||||
uri: buildTpdsUrl(userId, projectName, path),
|
||||
// We're sending a body with the DELETE request. This is unconventional,
|
||||
|
@ -146,6 +154,7 @@ async function createProject(params) {
|
|||
method: 'post',
|
||||
headers: {
|
||||
sl_project_id: projectId.toString(),
|
||||
'x-project-id': projectId,
|
||||
},
|
||||
uri: Path.join(
|
||||
tpdsUrl,
|
||||
|
@ -209,15 +218,20 @@ async function moveEntity(params) {
|
|||
const headers = {
|
||||
sl_project_id: projectId,
|
||||
sl_entity_rev: rev,
|
||||
'x-project-id': projectId,
|
||||
'x-entity-rev': rev,
|
||||
}
|
||||
if (entityId != null) {
|
||||
headers.sl_entity_id = entityId
|
||||
headers['x-entity-id'] = entityId
|
||||
}
|
||||
if (entityType != null) {
|
||||
headers.sl_entity_type = entityType
|
||||
headers['x-entity-type'] = entityType
|
||||
}
|
||||
if (folderId != null) {
|
||||
headers.sl_folder_id = folderId
|
||||
headers['x-folder-id'] = folderId
|
||||
}
|
||||
const job = {
|
||||
method: 'put',
|
||||
|
|
Loading…
Reference in a new issue