mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
5 files changed
+666
-542
No files matched your search
@@ -51,6 +51,10 @@ externalPort = 5000
|
||||
localPort = 41343
|
||||
externalPort = 3001
|
||||
|
||||
[[ports]]
|
||||
localPort = 41815
|
||||
externalPort = 8099
|
||||
|
||||
[[ports]]
|
||||
localPort = 43315
|
||||
externalPort = 6000
|
||||
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
ublishing post 7e27d1f3-3e85-4d19-b35d-9b4134fce2ce to facebook page Frouard
|
||||
|
||||
Error publishing post 54eabfab-437b-4d84-92aa-b24b9da84f8e: Error: Facebook API error: An unknown error has occurred. (code: 1)
|
||||
|
||||
at FacebookService.publishStory (file:///app/dist/index.js:1997:13)
|
||||
|
||||
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
|
||||
|
||||
at async FacebookService.publishPost (file:///app/dist/index.js:1824:14)
|
||||
|
||||
at async SchedulerService.publishPost (file:///app/dist/index.js:2072:24)
|
||||
|
||||
at async SchedulerService.processPendingPosts (file:///app/dist/index.js:2034:11)
|
||||
|
||||
at async file:///app/dist/index.js:2010:7
|
||||
|
||||
at async Timeout._onTimeout (/app/node_modules/node-cron/dist/esm/scheduler/runner.js:70:44)
|
||||
|
||||
Publishing post 7e27d1f3-3e85-4d19-b35d-9b4134fce2ce to facebook page Houdemont
|
||||
|
||||
Error publishing post 1be182d0-00e3-440f-a98c-dadfd45f0304: Error: Facebook API error: An unknown error has occurred. (code: 1)
|
||||
|
||||
at FacebookService.publishStory (file:///app/dist/index.js:1997:13)
|
||||
|
||||
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
|
||||
|
||||
at async FacebookService.publishPost (file:///app/dist/index.js:1824:14)
|
||||
|
||||
at async SchedulerService.publishPost (file:///app/dist/index.js:2072:24)
|
||||
|
||||
at async SchedulerService.processPendingPosts (file:///app/dist/index.js:2034:11)
|
||||
|
||||
at async file:///app/dist/index.js:2010:7
|
||||
|
||||
at async Timeout._onTimeout (/app/node_modules/node-cron/dist/esm/scheduler/runner.js:70:44)
|
||||
|
||||
6:40:50 AM [express] GET /api/scheduled-posts 200 in 48ms :: [{"id":"9128ce3e-88b5-4afe-9834-e79e2da…
|
||||
|
||||
6:40:51 AM [express] GET /api/auth/session 304 in 1ms :: {"id":"417b5410-1184-46d7-ac96-e85f731b0c98…
|
||||
|
||||
6:40:51 AM [express] GET /api/scheduled-posts 304 in 35ms :: [{"id":"9128ce3e-88b5-4afe-9834-e79e2da…
|
||||
|
||||
6:40:51 AM [express] GET /api/pages 304 in 40ms :: [{"id":"1abe2ba5-fd7b-423a-b82d-da953c340db2","us…
|
||||
|
||||
6:40:57 AM [express] GET /api/posts/7e27d1f3-3e85-4d19-b35d-9b4134fce2ce 304 in 6ms :: {"post":{"id"…
|
||||
|
||||
Publishing post 7e27d1f3-3e85-4d19-b35d-9b4134fce2ce to facebook page Frouard
|
||||
|
||||
Error publishing post 54eabfab-437b-4d84-92aa-b24b9da84f8e: Error: Facebook API error: An unknown error has occurred. (code: 1)
|
||||
|
||||
at FacebookService.publishStory (file:///app/dist/index.js:1997:13)
|
||||
|
||||
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
|
||||
|
||||
at async FacebookService.publishPost (file:///app/dist/index.js:1824:14)
|
||||
|
||||
at async SchedulerService.publishPost (file:///app/dist/index.js:2072:24)
|
||||
|
||||
at async SchedulerService.processPendingPosts (file:///app/dist/index.js:2034:11)
|
||||
|
||||
at async file:///app/dist/index.js:2010:7
|
||||
|
||||
at async Timeout._onTimeout (/app/node_modules/node-cron/dist/esm/scheduler/runner.js:70:44)
|
||||
|
||||
Publishing post 7e27d1f3-3e85-4d19-b35d-9b4134fce2ce to facebook page Houdemont
|
||||
|
||||
Error publishing post 1be182d0-00e3-440f-a98c-dadfd45f0304: Error: Facebook API error: An unknown error has occurred. (code: 1)
|
||||
|
||||
at FacebookService.publishStory (file:///app/dist/index.js:1997:13)
|
||||
|
||||
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
|
||||
|
||||
at async FacebookService.publishPost (file:///app/dist/index.js:1824:14)
|
||||
|
||||
at async SchedulerService.publishPost (file:///app/dist/index.js:2072:24)
|
||||
|
||||
at async SchedulerService.processPendingPosts (file:///app/dist/index.js:2034:11)
|
||||
|
||||
at async file:///app/dist/index.js:2010:7
|
||||
|
||||
at async Timeout._onTimeout (/app/node_modules/node-cron/dist/esm/scheduler/runner.js:70:44)
|
||||
|
||||
6:41:03 AM [express] GET /api/auth/session 304 in 1ms :: {"id":"417b5410-1184-46d7-ac96-e85f731b0c98…
|
||||
|
||||
6:41:03 AM [express] GET /api/scheduled-posts 304 in 42ms :: [{"id":"9128ce3e-88b5-4afe-9834-e79e2da…
|
||||
|
||||
6:41:03 AM [express] GET /api/pages 304 in 24ms :: [{"id":"1abe2ba5-fd7b-423a-b82d-da953c340db2","us…
|
||||
|
||||
6:41:07 AM [express] GET /api/stats 200 in 22ms :: {"scheduledPosts":2,"scheduledPostsChange":"+100%…
|
||||
|
||||
+280
-267
File diff suppressed because it is too large.
Load diff
+282
-267
File diff suppressed because it is too large.
Load diff
+10
-8
@@ -2080,14 +2080,16 @@ export class DatabaseStorage implements IStorage {
|
||||
// Essayer d'abord avec les nouveaux champs
|
||||
const [stats] = await db
|
||||
.select({
|
||||
active: sql<number>`COUNT(CASE WHEN ${dlcProducts.expiryDate} > ${today.toISOString().split('T')[0]} THEN 1 END)`,
|
||||
active: sql<number>`COUNT(CASE WHEN ${dlcProducts.expiryDate} > ${today.toISOString().split('T')[0]} AND ${dlcProducts.status} != 'valides' THEN 1 END)`,
|
||||
expiringSoon: sql<number>`COUNT(CASE
|
||||
WHEN ${dlcProducts.expiryDate} BETWEEN ${today.toISOString().split('T')[0]} AND ${alertDate.toISOString().split('T')[0]}
|
||||
AND ${dlcProducts.status} != 'valides'
|
||||
AND (${dlcProducts.processedUntilExpiry} IS NULL OR ${dlcProducts.processedUntilExpiry} = false)
|
||||
THEN 1 END)`,
|
||||
expired: sql<number>`COUNT(CASE
|
||||
WHEN ${dlcProducts.expiryDate} <= ${today.toISOString().split('T')[0]}
|
||||
AND (${dlcProducts.processedUntilExpiry} IS NULL OR ${dlcProducts.processedUntilExpiry} = false OR ${dlcProducts.expiryDate} < ${today.toISOString().split('T')[0]})
|
||||
AND ${dlcProducts.status} != 'valides'
|
||||
AND (${dlcProducts.processedUntilExpiry} IS NULL OR ${dlcProducts.processedUntilExpiry} = false)
|
||||
THEN 1 END)`
|
||||
})
|
||||
.from(dlcProducts)
|
||||
@@ -2102,9 +2104,9 @@ export class DatabaseStorage implements IStorage {
|
||||
// Fallback pour les bases de données sans les nouveaux champs
|
||||
const [stats] = await db
|
||||
.select({
|
||||
active: sql<number>`COUNT(CASE WHEN ${dlcProducts.expiryDate} > ${today.toISOString().split('T')[0]} THEN 1 END)`,
|
||||
expiringSoon: sql<number>`COUNT(CASE WHEN ${dlcProducts.expiryDate} BETWEEN ${today.toISOString().split('T')[0]} AND ${alertDate.toISOString().split('T')[0]} THEN 1 END)`,
|
||||
expired: sql<number>`COUNT(CASE WHEN ${dlcProducts.expiryDate} <= ${today.toISOString().split('T')[0]} THEN 1 END)`
|
||||
active: sql<number>`COUNT(CASE WHEN ${dlcProducts.expiryDate} > ${today.toISOString().split('T')[0]} AND ${dlcProducts.status} != 'valides' THEN 1 END)`,
|
||||
expiringSoon: sql<number>`COUNT(CASE WHEN ${dlcProducts.expiryDate} BETWEEN ${today.toISOString().split('T')[0]} AND ${alertDate.toISOString().split('T')[0]} AND ${dlcProducts.status} != 'valides' THEN 1 END)`,
|
||||
expired: sql<number>`COUNT(CASE WHEN ${dlcProducts.expiryDate} <= ${today.toISOString().split('T')[0]} AND ${dlcProducts.status} != 'valides' THEN 1 END)`
|
||||
})
|
||||
.from(dlcProducts)
|
||||
.where(whereCondition);
|
||||
@@ -4239,18 +4241,18 @@ export class MemStorage implements IStorage {
|
||||
}
|
||||
|
||||
return {
|
||||
active: products.filter(p => new Date(p.expiryDate) > today).length,
|
||||
active: products.filter(p => new Date(p.expiryDate) > today && p.status !== 'valides').length,
|
||||
expiringSoon: products.filter(p => {
|
||||
const expiry = new Date(p.expiryDate);
|
||||
const isExpiringSoon = expiry >= today && expiry <= alertDate;
|
||||
const isProcessed = p.processedUntilExpiry && expiry > today;
|
||||
return isExpiringSoon && !isProcessed;
|
||||
return isExpiringSoon && !isProcessed && p.status !== 'valides';
|
||||
}).length,
|
||||
expired: products.filter(p => {
|
||||
const expiry = new Date(p.expiryDate);
|
||||
const isExpired = expiry <= today;
|
||||
const isProcessed = p.processedUntilExpiry && expiry > today;
|
||||
return isExpired && !isProcessed;
|
||||
return isExpired && !isProcessed && p.status !== 'valides';
|
||||
}).length
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user