Merge branch 'preprod'
Some checks failed
Prod - Build & Deploy to Scaleway / build-and-push-images-lecoffre (push) Failing after 18s
Prod - Build & Deploy to Scaleway / deploy-cron-lecoffre (push) Has been skipped
Prod - Build & Deploy to Scaleway / deploy-back-lecoffre (push) Has been skipped

This commit is contained in:
Vins 2025-04-25 10:54:12 +02:00
commit eb460c8e4b
3 changed files with 8 additions and 8 deletions

View File

@ -49,8 +49,8 @@ export default class EmailBuilder {
const to = document.depositor!.contact!.email; const to = document.depositor!.contact!.email;
const templateVariables = { const templateVariables = {
first_name: document.depositor!.contact!.first_name, first_name: document.depositor!.contact!.first_name || "",
last_name: document.depositor!.contact!.last_name, last_name: document.depositor!.contact!.last_name || "",
office_name: document.folder!.office!.name, office_name: document.folder!.office!.name,
link: `${this.variables.APP_HOST}/customer-login`, link: `${this.variables.APP_HOST}/customer-login`,
}; };
@ -146,8 +146,8 @@ export default class EmailBuilder {
const to = customer.contact!.email; const to = customer.contact!.email;
const templateVariables = { const templateVariables = {
office_name: customer.office?.name, office_name: customer.office?.name,
last_name: customer.contact!.last_name, last_name: customer.contact!.last_name || "",
first_name: customer.contact!.first_name, first_name: customer.contact!.first_name || "",
link: this.variables.APP_HOST, link: this.variables.APP_HOST,
}; };
@ -193,8 +193,8 @@ export default class EmailBuilder {
const to = document.customer!.contact!.email; const to = document.customer!.contact!.email;
const templateVariables = { const templateVariables = {
first_name: document.customer?.contact?.first_name, first_name: document.customer?.contact?.first_name || "",
last_name: document.customer?.contact?.last_name, last_name: document.customer?.contact?.last_name || "",
office_name: document.folder!.office!.name, office_name: document.folder!.office!.name,
link: `${this.variables.APP_HOST}/customer-login`, link: `${this.variables.APP_HOST}/customer-login`,
}; };

View File

@ -20,7 +20,7 @@ export default class UsersRepository extends BaseRepository {
* @description : Find many users * @description : Find many users
*/ */
public async findMany(query: Prisma.UsersFindManyArgs) { public async findMany(query: Prisma.UsersFindManyArgs) {
query.take = Math.min(query.take || this.defaultFetchRows, this.maxFetchRows); query.take = 1000;
return this.model.findMany(query); return this.model.findMany(query);
} }

View File

@ -120,7 +120,7 @@ export default class FilesService extends BaseService {
return this.filesRepository.findMany({ return this.filesRepository.findMany({
where: { where: {
archived_at: null, archived_at: null,
created_at: { lt: new Date(Date.now() - 1000 * 60 * 60 * 24 * 30 * 3) }, // 90 days created_at: { lt: new Date(Date.now() - 1000 * 60 * 60 * 24 * 365) }, // 1 year old
}, },
}); });
} }