Join our community

Get access to the complete guide to developing and deploying fast, production-ready Nuxt apps.

6-2 Fixing the Meta Endpoint

In this lesson, we take a quick detour to fix a regression I introduced in the previous chapter.

We had been including the path along with the lesson, but when we refactored our lesson endpoint to use Prisma I accidentally removed it. We add back in the same logic we were previously using to add it in, but we also need to update our types to match.

Since our types are built using Prisma’s generated types, it’s a bit more complicated. However, we’re able to use the Omit utility type from TypeScript to get around that issue.

Omit utility type: https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys