mirror of
https://github.com/xtr-dev/payload-feature-flags.git
synced 2025-12-10 10:53:24 +00:00
Refactor feature flag utilities to inject Payload instance, add strict types, and update .npmignore settings
This commit is contained in:
@@ -3,7 +3,7 @@ import type { PayloadHandler } from 'payload'
|
||||
export const customEndpointHandler = (collectionSlug: string): PayloadHandler =>
|
||||
async (req) => {
|
||||
const { payload } = req
|
||||
const url = new URL(req.url)
|
||||
const url = new URL(req.url || '')
|
||||
const pathParts = url.pathname.split('/').filter(Boolean)
|
||||
const flagName = pathParts[pathParts.length - 1]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user