Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
img not required
Browse files
prisma/schema.prisma
CHANGED
@@ -13,7 +13,7 @@ datasource db {
|
|
13 |
model Model {
|
14 |
id String @id
|
15 |
createdAt DateTime @default(now())
|
16 |
-
image String
|
17 |
likes Int?
|
18 |
downloads Int?
|
19 |
instance_prompt String?
|
|
|
13 |
model Model {
|
14 |
id String @id
|
15 |
createdAt DateTime @default(now())
|
16 |
+
image String?
|
17 |
likes Int?
|
18 |
downloads Int?
|
19 |
instance_prompt String?
|
src/routes/api/scrap-models/[slug]/+server.ts
CHANGED
@@ -66,7 +66,11 @@ export async function POST({ request, params }) {
|
|
66 |
} : {}
|
67 |
)
|
68 |
}
|
69 |
-
}).catch(() => {
|
|
|
|
|
|
|
|
|
70 |
|
71 |
return json({
|
72 |
message: `Successfully added the model ${model.id}`,
|
|
|
66 |
} : {}
|
67 |
)
|
68 |
}
|
69 |
+
}).catch((err) => {
|
70 |
+
return json({
|
71 |
+
message: err.message
|
72 |
+
}, { status: 500 })
|
73 |
+
})
|
74 |
|
75 |
return json({
|
76 |
message: `Successfully added the model ${model.id}`,
|