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
18 lessons
7 lessons
7 lessons
11 lessons
18 lessons
8 lessons
17 lessons