Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions middleware #9976

Merged
merged 38 commits into from
Nov 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift click to select a range
e3668b1
replace cookie redirect notices with a custom session guide
bholmesdev Nov 7, 2024
fbb6a08
add since 5.0
bholmesdev Nov 7, 2024
81937f1
add detail to guide code snippets
bholmesdev Nov 7, 2024
63ac703
add `getActionContext()` reference
bholmesdev Nov 7, 2024
4f54aec
add 5.0 change
bholmesdev Nov 7, 2024
7c5336c
nit: session -> sessions
bholmesdev Nov 7, 2024
b154039
fix missing async on cookie example
bholmesdev Nov 7, 2024
8810baf
add security section
bholmesdev Nov 7, 2024
693c088
add Since badge for 'gate actions from middleware'
bholmesdev Nov 7, 2024
dbe5a15
add code formatting
bholmesdev Nov 7, 2024
3b3c48f
replace build_hash example with session token exampel
bholmesdev Nov 7, 2024
2a172c4
nit: remove unused hash variable
bholmesdev Nov 7, 2024
8f287e5
change list of examples to simpler sentence
bholmesdev Nov 8, 2024
d5df652
remove stray absolute link
bholmesdev Nov 8, 2024
fa270ef
remove stray absolute link 2
bholmesdev Nov 8, 2024
9723a27
remove stray absolute link 3
bholmesdev Nov 8, 2024
d41bbfd
move Since to after the type def
bholmesdev Nov 8, 2024
1581ab8
clarify how the redirect removes the resubmission dialog
bholmesdev Nov 8, 2024
f74350a
reword the action return value section
bholmesdev Nov 8, 2024
bc12d81
fix grammar
bholmesdev Nov 8, 2024
c1a8688
remove misleading "reintroduces
bholmesdev Nov 8, 2024
509b916
add SourcePR label
bholmesdev Nov 8, 2024
d0db878
nit: still -> however
bholmesdev Nov 8, 2024
79789b7
remove needless example of actions.blog.like
bholmesdev Nov 8, 2024
e9a3fae
rework netlify note into paragraph
bholmesdev Nov 8, 2024
2571cb3
stop telling people it's easy
bholmesdev Nov 8, 2024
4c76da6
reword 'Forbidden' to be near the example explanation
bholmesdev Nov 8, 2024
09f6632
rephrase 'what should I do?' to recommend sessions
bholmesdev Nov 8, 2024
410466e
ugh
bholmesdev Nov 8, 2024
f12ed6b
HOWEVER
bholmesdev Nov 8, 2024
3cff78a
move SourcePR to top of change section
bholmesdev Nov 8, 2024
dd74770
typo fix
sarah11918 Nov 11, 2024
eb43dac
make reference more boring
bholmesdev Nov 11, 2024
8446d8b
break "call this function..." to new line
bholmesdev Nov 11, 2024
4cc9367
make action reference more boring
bholmesdev Nov 11, 2024
beab04a
add setActionResult example
bholmesdev Nov 11, 2024
83ff5a6
add deserialize use case
bholmesdev Nov 11, 2024
4722704
Merge branch '5.0.0-beta' into actions-middleware
sarah11918 Nov 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add deserialize use case
  • Loading branch information
bholmesdev committed Nov 11, 2024
commit 83ff5a604e5fb61c4cae5414787fa2aa5e1d952c
2 changes: 1 addition & 1 deletion src/content/docs/en/reference/modules/astro-actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -286,4 286,4 @@ export const onRequest = defineMiddleware(async (context, next) => {
**Type:** `(result: SerializedActionResult) => SafeResult<any, any>`
</p>

`deserializeActionResult()` will deserialize an action result serialized using `serializeActionResult()`.
`deserializeActionResult()` will reverse the effect of `serializeActionResult()` and return an action result to its original state. This is useful to access the `data` and `error` objects on a serialized action result.
Loading