0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

[ci] format

This commit is contained in:
matthewp 2023-09-21 12:58:10 +00:00 committed by astrobot-houston
parent bcad715ce6
commit a576ba9c37
2 changed files with 7 additions and 3 deletions

View file

@ -1,2 +1,6 @@
export { AstroCookies } from './cookies.js';
export { attachCookiesToResponse, responseHasCookies, getSetCookiesFromResponse } from './response.js';
export {
attachCookiesToResponse,
getSetCookiesFromResponse,
responseHasCookies,
} from './response.js';

View file

@ -5,9 +5,9 @@ import type {
MiddlewareHandler,
MiddlewareNext,
} from '../../@types/astro.js';
import { attachCookiesToResponse, responseHasCookies } from '../cookies/index.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
import type { Environment } from '../render/index.js';
import { attachCookiesToResponse, responseHasCookies } from '../cookies/index.js';
/**
* Utility function that is in charge of calling the middleware.
@ -112,7 +112,7 @@ export async function callMiddleware<R>(
}
function ensureCookiesAttached(apiContext: APIContext, response: Response): Response {
if(apiContext.cookies !== undefined && !responseHasCookies(response)) {
if (apiContext.cookies !== undefined && !responseHasCookies(response)) {
attachCookiesToResponse(response, apiContext.cookies);
}
return response;