Skip to content

Commit

Permalink
Merge pull request #45536 from Expensify/Rory-RemoveAuthWritesHack
Browse files Browse the repository at this point in the history
[No QA] Remove front-end workaround for authWrites issue
  • Loading branch information
johnmlee101 authored Sep 9, 2024
2 parents 2eb51e3 + e2a6f60 commit b87921b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/libs/HttpUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ const abortControllerMap = new Map<AbortCommand, AbortController>();
abortControllerMap.set(ABORT_COMMANDS.All, new AbortController());
abortControllerMap.set(ABORT_COMMANDS.SearchForReports, new AbortController());

// Some existing old commands (6+ years) exempted from the auth writes count check
const exemptedCommandsWithAuthWrites: string[] = ['SetWorkspaceAutoReportingFrequency'];

/**
* The API commands that require the skew calculation
*/
Expand Down Expand Up @@ -133,7 +130,7 @@ function processHTTPRequest(url: string, method: RequestType = 'get', body: Form
});
}

if (response.jsonCode === CONST.JSON_CODE.MANY_WRITES_ERROR && !exemptedCommandsWithAuthWrites.includes(response.data?.phpCommandName ?? '')) {
if (response.jsonCode === CONST.JSON_CODE.MANY_WRITES_ERROR) {
if (response.data) {
const {phpCommandName, authWriteCommands} = response.data;
// eslint-disable-next-line max-len
Expand Down

0 comments on commit b87921b

Please sign in to comment.