You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removes PayloadRequestWithData in favour of just PayloadRequest with
optional types for `data` and `locale`
`addDataAndFileToRequest` and `addLocalesToRequestFromData` now takes in
a single argument instead of an object
```ts
// before
await addDataAndFileToRequest({ request: req })
addLocalesToRequestFromData({ request: req })
// current
await addDataAndFileToRequest(req)
addLocalesToRequestFromData(req)
```
---------
Co-authored-by: Paul Popus <paul@nouance.io>
The locale and the fallback locale are not automatically appended to custom endpoint requests. If you would like to add them you can use this helper function.
// you now can access req.locale & req.fallbackLocale
687
+
returnResponse.json({ message: 'success' })
688
+
}
689
+
}
690
+
```
691
+
692
+
693
+
622
694
## Method Override for GET Requests
623
695
624
696
Payload supports a method override feature that allows you to send GET requests using the HTTP POST method. This can be particularly useful in scenarios when the query string in a regular GET request is too long.
0 commit comments