Skip to content

Commit

Permalink
no empty urls in popular list
Browse files Browse the repository at this point in the history
  • Loading branch information
hilmarp committed Nov 24, 2024
1 parent 6549f5c commit ea6ca76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion mongo-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ db.createCollection("recipes");
db.recipes.createIndex({ uuid: 1 }, { unique: true });
db.recipes.createIndex({ slug: 1 }, { unique: true });
db.recipes.createIndex({ createdByUuid: 1, slug: 1 }, { unique: true });
db.recipes.createIndex({ createdByUuid: 1, uuid: 1 });

db.createCollection("tags");
db.tags.createIndex({ uuid: 1 }, { unique: true });
Expand Down
4 changes: 4 additions & 0 deletions src/routes/v1/authed/recipes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ const recipes = async (fastify: FastifyInstance, options: Object) => {
},
{
$match: {
"recipe.data.canonical_url": {
$exists: true,
$ne: "",
},
count: {
$gt: 1,
},
Expand Down

0 comments on commit ea6ca76

Please sign in to comment.