Checkpoint: Ajout du bouton "Vérifier maintenant" pour forcer une vérification immédiate des emails sans attendre le prochain cycle automatique.
This commit is contained in:
@@ -34,7 +34,7 @@ import { loginLocal, hashPassword, getAzureAuthUrl, isAzureAdConfigured, generat
|
||||
import { extractInvoicesWithMistral, generateMetadataJSON } from "./invoiceExtractor";
|
||||
import { localStoragePut, generateStorageKey } from "./localStorage";
|
||||
import { testSftpConnection, exportInvoiceToSftp, getUserSftpConfig } from "./sftpExport";
|
||||
import { startEmailImportService, stopEmailImportService, isEmailImportServiceRunning } from "./emailImportService";
|
||||
import { startEmailImportService, stopEmailImportService, isEmailImportServiceRunning, triggerEmailCheck } from "./emailImportService";
|
||||
import { startFolderImportService, stopFolderImportService, isFolderImportServiceRunning } from "./folderImportService";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
@@ -614,8 +614,12 @@ export const appRouter = router({
|
||||
}),
|
||||
|
||||
status: protectedProcedure.query(async ({ ctx }) => {
|
||||
const isRunning = isEmailImportServiceRunning(ctx.user.id);
|
||||
return { isRunning };
|
||||
return { isRunning: isEmailImportServiceRunning(ctx.user.id) };
|
||||
}),
|
||||
|
||||
checkNow: protectedProcedure.mutation(async ({ ctx }) => {
|
||||
const result = await triggerEmailCheck(ctx.user.id);
|
||||
return result;
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user