mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] format
This commit is contained in:
parent
bcad715ce6
commit
a576ba9c37
2 changed files with 7 additions and 3 deletions
|
@ -1,2 +1,6 @@
|
|||
export { AstroCookies } from './cookies.js';
|
||||
export { attachCookiesToResponse, responseHasCookies, getSetCookiesFromResponse } from './response.js';
|
||||
export {
|
||||
attachCookiesToResponse,
|
||||
getSetCookiesFromResponse,
|
||||
responseHasCookies,
|
||||
} from './response.js';
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue