Skip to content

Commit

Permalink
chore: rename pixels table to pixel
Browse files Browse the repository at this point in the history
  • Loading branch information
pumbas600 committed Mar 28, 2024
1 parent af260d1 commit c957e63
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"build": "tsc",
"dev": "nodemon src/index.ts --devmode",
"start": "node build/index.js",
"postinstall": "pnpm dlx prisma generate",
"postinstall": "prisma generate",
"lint": "biome lint .",
"lint:fix": "biome lint --apply .",
"format": "biome format .",
Expand Down
6 changes: 3 additions & 3 deletions packages/backend/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ model canvas {
cooldown_length Int?
start_coordinates Int[]
frames frame[]
pixels pixels[]
pixels pixel[]
history history[]
cooldowns cooldown[]
}
Expand All @@ -37,7 +37,7 @@ model color {
global Boolean @default(true)
name String
rgba Int[]
pixels pixels[]
pixels pixel[]
history history[]
participant participation?
}
Expand Down Expand Up @@ -122,7 +122,7 @@ model participation {
@@id([guild_id, event_id])
}

model pixels {
model pixel {
canvas_id Int
canvas canvas @relation(fields: [canvas_id], references: [id])
x Int
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function createApp(): ExpressServer {

app.get("/pixels", async (req, res) => {
// Example usage :)
const pixels = await prisma.pixels.findMany({
const pixels = await prisma.pixel.findMany({
// Only select a subset of the table
select: { x: true, y: true, color_id: true },
where: {
Expand Down

0 comments on commit c957e63

Please sign in to comment.