keystone-design-bootstrap 1.0.57 → 1.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -160,16 +160,14 @@ async function handleLogout(_request: Request, NR: NextResponseLike): Promise<Re
|
|
|
160
160
|
/**
|
|
161
161
|
* Creates a single POST handler that routes to the correct auth action based on
|
|
162
162
|
* the dynamic `[action]` path segment.
|
|
163
|
-
*
|
|
164
|
-
* Compatible with Next.js 14 (sync params) and 15 (async params).
|
|
165
163
|
*/
|
|
166
164
|
export function createConsumerAuthHandlers({ NextResponse }: { NextResponse: NextResponseLike }) {
|
|
167
165
|
return {
|
|
168
166
|
POST: async (
|
|
169
167
|
request: Request,
|
|
170
|
-
context: { params: Promise<{ action: string }>
|
|
168
|
+
context: { params: Promise<{ action: string }> }
|
|
171
169
|
): Promise<Response> => {
|
|
172
|
-
const { action } = await
|
|
170
|
+
const { action } = await context.params;
|
|
173
171
|
if (action === 'initiate') return handleInitiate(request, NextResponse);
|
|
174
172
|
if (action === 'login') return handleLogin(request, NextResponse);
|
|
175
173
|
if (action === 'signup') return handleSignup(request, NextResponse);
|