Spaces:
Runtime error
Runtime error
rewrite function
Browse files
app/api/collections/route.ts
CHANGED
@@ -28,6 +28,12 @@ export async function GET(request: Request) {
|
|
28 |
skip: page * 15
|
29 |
}
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
// if (userId) {
|
32 |
// query.where = {
|
33 |
// userId: {
|
|
|
28 |
skip: page * 15
|
29 |
}
|
30 |
|
31 |
+
if (userId) {
|
32 |
+
query.where.userId = {
|
33 |
+
equals: userId
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
// if (userId) {
|
38 |
// query.where = {
|
39 |
// userId: {
|