enzostvs HF Staff commited on
Commit
248e594
·
1 Parent(s): e084412

rewrite function

Browse files
Files changed (1) hide show
  1. app/api/collections/route.ts +6 -0
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: {