Skip to content

Commit

Permalink
chore(api-rest): manual fix of errors reported by yarn lint
Browse files Browse the repository at this point in the history
  • Loading branch information
HuiSF committed Feb 12, 2024
1 parent daf09d9 commit dcdb77e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion packages/api-rest/src/apis/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import {
* },
* });
* ```
* @see {@link clientGet}
*/
export const get = (
contextSpec: AmplifyServer.ContextSpec,
Expand Down
4 changes: 2 additions & 2 deletions packages/api-rest/src/utils/createCancellableOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ export function createCancellableOperation(
abortController?: AbortController,
): Operation<HttpResponse> | Promise<HttpResponse> {
const isInternalPost = (
handler:
targetHandler:
| ((signal: AbortSignal) => Promise<HttpResponse>)
| (() => Promise<HttpResponse>),
): handler is () => Promise<HttpResponse> => !!abortController;
): targetHandler is () => Promise<HttpResponse> => !!abortController;

// For creating a cancellable operation for public REST APIs, we need to create an AbortController
// internally. Whereas for internal POST APIs, we need to accept in the AbortController from the
Expand Down
1 change: 0 additions & 1 deletion packages/api-rest/src/utils/resolveHeaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const resolveHeaders = (
body?: unknown,
) => {
const normalizedHeaders: Record<string, string> = {};
const isFormData = body instanceof FormData;
for (const key in headers) {
normalizedHeaders[key.toLowerCase()] = headers[key];
}
Expand Down

0 comments on commit dcdb77e

Please sign in to comment.