Typescript fix, almost finished the sprite generator

This commit is contained in:
2024-07-26 17:26:09 +02:00
parent e3bafca0ad
commit fb6e9d2fcc
2 changed files with 88 additions and 22 deletions

View File

@ -1,5 +1,5 @@
import prisma from '../utilities/Prisma' // Import the global Prisma instance
import { Sprite } from '@prisma/client'
import { Sprite, SpriteAction } from '@prisma/client'
class SpriteRepository {
async getById(id: string): Promise<Sprite | null> {
@ -19,7 +19,7 @@ class SpriteRepository {
})
}
async getSpriteActions(spriteId: string) {
async getSpriteActions(spriteId: string): Promise<SpriteAction[]> {
return prisma.spriteAction.findMany({
where: {
spriteId