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

Fix creating articles #18

Merged
merged 3 commits into from
Aug 4, 2024
Merged

Fix creating articles #18

merged 3 commits into from
Aug 4, 2024

Conversation

allouis
Copy link
Collaborator

@allouis allouis commented Aug 4, 2024

Since the upgrade from 0.11.0-dev to 0.13.0-dev Fedify no longer accepts a
datetime string for the published property and requires a Temporal.Instant

We've fixed that issue, added better types - which would have caught the
issue, and added e2e tests including a breaking test for this bug

allouis added 3 commits August 4, 2024 18:46
There is a bug where the incorrect type was being passed as the `published`
property when creating an instance of Article. This should have been caught by
the type system, but we were dealing with implicit `any` types for the body of
the request. This change introduces the use of Zod for parsing the request body
as well as providing types so that we can catch issues like this in future.
Now that we're able to skip HTTP signature verification we can easily run E2E
tests with arbitrary data in the body. We have a basic setup for cumcumber
tests here, including a breaking test for the post.published webhook handler.
Since the upgrade from 0.11.0-dev to 0.13.0-dev Fedify no longer accepts a
datetime string for the `published` property and requires a Temporal.Instant
@allouis allouis force-pushed the fix-creating-articles branch from d8c944f to eb7a68e Compare August 4, 2024 11:51
@allouis allouis force-pushed the fix-creating-articles branch from eb7a68e to 5219a3d Compare August 4, 2024 12:01
@allouis allouis merged commit 5689ed8 into main Aug 4, 2024
1 check passed
@allouis allouis deleted the fix-creating-articles branch August 4, 2024 12:11
@allouis allouis changed the title [WIP] Fix creating articles Fix creating articles Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant