Create a food ordering app with Strapi and Next.js (6)

Hi, thank you for this tutorial. I have made it this far, but I’m having some issues here. When I test completing an order, in Strapi, the order is a “draft,” and there is no user connected to the order. I tried creating a publishedAtValue variable and passing it into the order create, but these problems are persisting. Help please?

const publishedAtVal = new Date();

const order = await strapi.service("api::order.order").create({
        data: {
          amount,
          address,
          dishes,
          city,
          state,
          token,
          user: ctx.state.user.id,
          publishedAt: publishedAtVal,
        },
      });
      return order;```