mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-11-01 09:50:26 +01:00
added @request.context field
This commit is contained in:
1 parent
6aaf98215d
commit
a11abef84b
42 files changed
+79
-43
No files matched your search
@@ -89,6 +89,7 @@ func NewRecordFieldResolver(
|
||||
loadedCollections: []*models.Collection{baseCollection},
|
||||
allowedFields: []string{
|
||||
`^\w+[\w\.\:]*$`,
|
||||
`^\@request\.context$`,
|
||||
`^\@request\.method$`,
|
||||
`^\@request\.auth\.[\w\.\:]*\w+$`,
|
||||
`^\@request\.data\.[\w\.\:]*\w+$`,
|
||||
@@ -100,6 +101,7 @@ func NewRecordFieldResolver(
|
||||
|
||||
r.staticRequestInfo = map[string]any{}
|
||||
if r.requestInfo != nil {
|
||||
r.staticRequestInfo["context"] = r.requestInfo.Context
|
||||
r.staticRequestInfo["method"] = r.requestInfo.Method
|
||||
r.staticRequestInfo["query"] = r.requestInfo.Query
|
||||
r.staticRequestInfo["headers"] = r.requestInfo.Headers
|
||||
|
||||
Reference in new issue
Block a user