-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(export): upload and notify (#2526)
* refactor dates helper import * cast start_at and end_at as Dates in ExportParams * add Export tests * fix set() import * document middlewares * fix inputs casting and validation * move middlewares to pdc/middlewares * move permissions config to user service * check user existence * add jq to flake * add Storage and Notify services * add minio-client to flake * notify support on export error * logger fileCreateService error * fix: decrease log level --------- Co-authored-by: Nicolas Mérigot <nicolas.merigot@beta.gouv.fr>
- Loading branch information
1 parent
e13aa8b
commit 119562c
Showing
38 changed files
with
952 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { env_or_default } from "@/lib/env/index.ts"; | ||
|
||
export const support = { | ||
email: env_or_default( | ||
"APP_CONTACT_SUPPORT_EMAIL", | ||
"technique@covoiturage.beta.gouv.fr", | ||
), | ||
fullname: env_or_default( | ||
"APP_CONTACT_SUPPORT_FULLNAME", | ||
"Equipe technique covoiturage", | ||
), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { defaultTimezone } from "@/config/time.ts"; | ||
import { NextFunction } from "@/deps.ts"; | ||
import { ContextType, middleware } from "@/ilos/common/index.ts"; | ||
import { Timezone } from "@/pdc/providers/validator/types.ts"; | ||
|
||
/** | ||
* Set the params.tz property to the default time zone | ||
* if it is not already set. | ||
*/ | ||
@middleware() | ||
export class DefaultTimezoneMiddleware<TParams extends { tz: Timezone }> { | ||
async process( | ||
params: TParams, | ||
context: ContextType, | ||
next: NextFunction, | ||
): Promise<unknown> { | ||
if (!params.tz) { | ||
params.tz = defaultTimezone; | ||
} | ||
|
||
return next(params, context); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { operator } from "@/shared/user/permissions.config.ts"; | ||
import { operator } from "@/pdc/services/user/config/permissions.ts"; | ||
|
||
export const application = [...operator.application.permissions]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.