From ee0c106a2cce2af5bbd566bbfb11ecbb2a9dbf59 Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Thu, 20 Feb 2025 16:38:54 +0100 Subject: [PATCH] feat: update local files base path --- README.md | 5 +++++ cli/_templates_loader.ts | 2 +- config/loader.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 13982eb..db9bacf 100644 --- a/README.md +++ b/README.md @@ -42,3 +42,8 @@ deno install \ # OR ./cohamail -h ``` + +## Configuration + +You can override default config and templates with your own in +`/etc/cohabit/mailer/(config|templates)/`. diff --git a/cli/_templates_loader.ts b/cli/_templates_loader.ts index 2cb7742..a2a45ae 100644 --- a/cli/_templates_loader.ts +++ b/cli/_templates_loader.ts @@ -19,7 +19,7 @@ for (const template of Object.values(defaultTemplates)) { } //Load local templates -const basePath = '/etc/cohabit/mailer' +const basePath = '/etc/cohabit/mailer/templates' if (await exists(basePath)) { for await (const template of Deno.readDir(basePath)) { diff --git a/config/loader.ts b/config/loader.ts index b416d22..2d750d0 100644 --- a/config/loader.ts +++ b/config/loader.ts @@ -37,7 +37,7 @@ async function readJsonFile< return { ...defaultValue, ...json } } -const basePath = '/ect/cohabit/mailer' +const basePath = '/ect/cohabit/mailer/config' export const accounts = await readJsonFile( `${basePath}/account.json`,