Skip to content

Commit b845b7c

Browse files
author
Joan Reyero
committed
Fixes
1 parent 536ef3f commit b845b7c

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

backend/src/database/repositories/eagleEyeContentRepository.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ export default class EagleEyeContentRepository {
126126
const parsedActionQuery: QueryOutput = actionQueryParser.parse({
127127
filter: advancedFilter.action,
128128
orderBy: 'timestamp_DESC',
129+
limit,
130+
offset,
129131
})
130132

131133
actionsSequelizeInclude.where = parsedActionQuery.where ?? {}

backend/src/services/eagleEyeActionService.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ export default class EagleEyeActionService extends LoggingBase {
1818
const transaction = await SequelizeRepository.createTransaction(this.options)
1919

2020
// find content
21-
const content = await EagleEyeContentRepository.findById(contentId, this.options)
21+
const content = await EagleEyeContentRepository.findById(contentId, {
22+
...this.options,
23+
transaction,
24+
})
2225

2326
if (!content) {
2427
throw new Error404(this.options.language, 'errors.eagleEye.contentNotFound')

backend/src/services/eagleEyeContentService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export default class EagleEyeContentService extends LoggingBase {
9494
default:
9595
return null
9696
}
97-
return dateMoment.add(offset, 'days').format('YYYY-MM-DD')
97+
return dateMoment.subtract(offset, 'days').format('YYYY-MM-DD')
9898
}
9999

100100
async search(email = false) {
@@ -137,7 +137,7 @@ export default class EagleEyeContentService extends LoggingBase {
137137
const interacted = (
138138
await this.query({
139139
filter: {
140-
postedAt: { gt: EagleEyeContentService.switchDate(feedSettings.publishedDate, 15) },
140+
postedAt: { gt: EagleEyeContentService.switchDate(feedSettings.publishedDate, 90) },
141141
},
142142
})
143143
).rows

0 commit comments

Comments
 (0)