Skip to content

post Endpoint (not working) #27

@oneezy

Description

@oneezy

Bug description

I'm taking the Fullstack SvelteKit course and running into a bug at the 2:56:00 mark when trying to create the post Endpoint
https://youtu.be/OUzaUJ3gEug?t=10560

import type { RequestHandler } from "@sveltejs/kit";

// this breaks...
export const post: RequestHandler<{}, FormData> = (request) => {
  console.log(request.body.get("text"));
} 

When submitting the post request from the form, I get the 500 (Internal Server Error) and it appears that a new Breaking PR was merged in 7 days ago from rich that broke it
sveltejs/kit#3384

Can anyone recommend a good step-by-step for me to follow to fix?

Steps to reproduce

Follow the tutorial! :)

Expected behavior

No response

Example repository

You can see the finished code in question on Github
https://github.com/gitpod-io/full-stack-web-development/blob/main/src/routes/todos/index.json.ts

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions