diff --git a/backend/src/seed/seed-db.js b/backend/src/seed/seed-db.js index afdd6adef..d64aa998c 100644 --- a/backend/src/seed/seed-db.js +++ b/backend/src/seed/seed-db.js @@ -114,7 +114,7 @@ import { gql } from '../jest/helpers' }), factory.create('Badge', { id: 'indiegogo_en_wolf', - icon: '/img/badges/indiegogo_en_wolfactory.svg', + icon: '/img/badges/indiegogo_en_wolf.svg', }), factory.create('Badge', { id: 'indiegogo_en_bear', @@ -694,6 +694,214 @@ import { gql } from '../jest/helpers' }) }), ) + + await Promise.all( + [...Array(6).keys()].map(() => { + return factory.create('Comment', { + author: jennyRostock, + postId: 'p2', + }) + }) + ) + + await Promise.all( + [...Array(4).keys()].map(() => { + return factory.create('Comment', { + author: jennyRostock, + postId: 'p15', + }) + }) + ) + + await Promise.all( + [...Array(2).keys()].map(() => { + return factory.create('Comment', { + author: jennyRostock, + postId: 'p4', + }) + }) + ) + + await Promise.all( + [...Array(21).keys()].map(() => { + return factory.create('Post', { + author: peterLustig, + image: faker.image.unsplash.buildings(), + }) + }), + ) + + await Promise.all( + [...Array(3).keys()].map(() => { + return factory.create('Comment', { + author: peterLustig, + postId: 'p4', + }) + }) + ) + + await Promise.all( + [...Array(5).keys()].map(() => { + return factory.create('Comment', { + author: peterLustig, + postId: 'p14', + }) + }) + ) + + await Promise.all( + [...Array(6).keys()].map(() => { + return factory.create('Comment', { + author: peterLustig, + postId: 'p0', + }) + }) + ) + + await Promise.all( + [...Array(11).keys()].map(() => { + return factory.create('Post', { + author: dewey, + image: faker.image.unsplash.food(), + }) + }), + ) + + await Promise.all( + [...Array(7).keys()].map(() => { + return factory.create('Comment', { + author: dewey, + postId: 'p2', + }) + }) + ) + + await Promise.all( + [...Array(5).keys()].map(() => { + return factory.create('Comment', { + author: dewey, + postId: 'p6', + }) + }) + ) + + await Promise.all( + [...Array(2).keys()].map(() => { + return factory.create('Comment', { + author: dewey, + postId: 'p9', + }) + }) + ) + + await Promise.all( + [...Array(16).keys()].map(() => { + return factory.create('Post', { + author: louie, + image: faker.image.unsplash.technology(), + }) + }), + ) + + await Promise.all( + [...Array(4).keys()].map(() => { + return factory.create('Comment', { + author: louie, + postId: 'p1', + }) + }) + ) + + await Promise.all( + [...Array(8).keys()].map(() => { + return factory.create('Comment', { + author: louie, + postId: 'p10', + }) + }) + ) + + await Promise.all( + [...Array(5).keys()].map(() => { + return factory.create('Comment', { + author: louie, + postId: 'p13', + }) + }) + ) + + await Promise.all( + [...Array(45).keys()].map(() => { + return factory.create('Post', { + author: bobDerBaumeister, + image: faker.image.unsplash.people(), + }) + }), + ) + + await Promise.all( + [...Array(2).keys()].map(() => { + return factory.create('Comment', { + author: bobDerBaumeister, + postId: 'p2', + }) + }) + ) + + await Promise.all( + [...Array(3).keys()].map(() => { + return factory.create('Comment', { + author: bobDerBaumeister, + postId: 'p12', + }) + }) + ) + + await Promise.all( + [...Array(7).keys()].map(() => { + return factory.create('Comment', { + author: bobDerBaumeister, + postId: 'p13', + }) + }) + ) + + await Promise.all( + [...Array(8).keys()].map(() => { + return factory.create('Post', { + author: huey, + image: faker.image.unsplash.nature(), + }) + }), + ) + + await Promise.all( + [...Array(6).keys()].map(() => { + return factory.create('Comment', { + author: huey, + postId: 'p0', + }) + }) + ) + + await Promise.all( + [...Array(8).keys()].map(() => { + return factory.create('Comment', { + author: huey, + postId: 'p13', + }) + }) + ) + + await Promise.all( + [...Array(9).keys()].map(() => { + return factory.create('Comment', { + author: huey, + postId: 'p15', + }) + }) + ) + /* eslint-disable-next-line no-console */ console.log('Seeded Data...') process.exit(0) diff --git a/webapp/pages/index.vue b/webapp/pages/index.vue index d41e7d440..360a72303 100644 --- a/webapp/pages/index.vue +++ b/webapp/pages/index.vue @@ -151,7 +151,7 @@ export default { orderBy: this.sorting, }, updateQuery: (previousResult, { fetchMoreResult }) => { - if (!fetchMoreResult || fetchMoreResult.Post.length <= this.pageSize) { + if (!fetchMoreResult || fetchMoreResult.Post.length < this.pageSize) { this.hasMore = false } const result = Object.assign({}, previousResult, { diff --git a/webapp/pages/profile/_id/_slug.vue b/webapp/pages/profile/_id/_slug.vue index 8879190f5..abcb1dcda 100644 --- a/webapp/pages/profile/_id/_slug.vue +++ b/webapp/pages/profile/_id/_slug.vue @@ -251,7 +251,7 @@