Implementação das ações incluir, atualizar e remover apontamentos de horas
This commit is contained in:
@@ -966,9 +966,14 @@ async function executeComcipFetch(tabId, requestUrl, method, payload, headers, r
|
||||
headers: requestHeaders,
|
||||
};
|
||||
|
||||
if (normalizedMethod !== "GET" && normalizedMethod !== "HEAD") {
|
||||
if (
|
||||
normalizedMethod !== "GET" &&
|
||||
normalizedMethod !== "HEAD" &&
|
||||
requestPayload !== undefined &&
|
||||
requestPayload !== null
|
||||
) {
|
||||
requestHeaders["content-type"] = "application/json";
|
||||
fetchOptions.body = JSON.stringify(requestPayload || {});
|
||||
fetchOptions.body = JSON.stringify(requestPayload);
|
||||
}
|
||||
|
||||
const response = await fetch(requestUrl, {
|
||||
@@ -1130,9 +1135,14 @@ async function executeComcipFetchFromFrame(
|
||||
headers: requestHeaders,
|
||||
};
|
||||
|
||||
if (normalizedMethod !== "GET" && normalizedMethod !== "HEAD") {
|
||||
if (
|
||||
normalizedMethod !== "GET" &&
|
||||
normalizedMethod !== "HEAD" &&
|
||||
requestPayload !== undefined &&
|
||||
requestPayload !== null
|
||||
) {
|
||||
requestHeaders["content-type"] = "application/json";
|
||||
fetchOptions.body = JSON.stringify(requestPayload || {});
|
||||
fetchOptions.body = JSON.stringify(requestPayload);
|
||||
}
|
||||
|
||||
const response = await fetch(requestUrl, fetchOptions);
|
||||
@@ -1264,9 +1274,14 @@ async function executeComcipDirectFetch(
|
||||
headers: requestHeaders,
|
||||
};
|
||||
|
||||
if (normalizedMethod !== "GET" && normalizedMethod !== "HEAD") {
|
||||
if (
|
||||
normalizedMethod !== "GET" &&
|
||||
normalizedMethod !== "HEAD" &&
|
||||
payload !== undefined &&
|
||||
payload !== null
|
||||
) {
|
||||
requestHeaders["content-type"] = "application/json";
|
||||
fetchOptions.body = JSON.stringify(payload || {});
|
||||
fetchOptions.body = JSON.stringify(payload);
|
||||
}
|
||||
|
||||
const response = await fetch(requestUrl, fetchOptions);
|
||||
|
||||
Reference in New Issue
Block a user